title: Changing taxonomy term by slug (wp_update_term)

text: What I am trying to accomplish is to update a taxonomy term name using its slug rather than the $term_id Wordpress does this by:               <?php wp_update_term( $term_id, $taxonomy, $args )  ?>      Is it possible to do this via the slug instead?               <?php wp_update_term( get_term_by( 'slug', $value, $taxonomy, $output, $filter ) )  ?>      I've been stuck on this for a while - but no success. The default taxonomy terms are created by a plugin. I am creating a secondary plugin to change the taxonomy terms created by the 'parent' plugin. Thanks! Roc. \--- Edit --- Should mention that I am not able to update the term by id because the taxonomy id changes based on when the plugin is activated, and if other tags exists before it can be created.


title: How to show only today's post?

text:
I want to show only today's or current date post in my blog.   Here is my code but it's not working.               <?php        $day = date('j');        query_posts('day='.$day);        if (have_posts()) :     while (have_posts()) : the_post();       ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="view: <?php the_title(); ?>"><?php the_title(); ?>

<?php the_content(); ?>
     <?php endwhile; ?>     <?php endif; ?>      How to solve this?


title: Plugin for "Was This Helpful" at end of post?

text: I'd like to use a Wordpress instance as a product help & faq platform. I'm wondering if there is a lightweight plugin that provides a "yes/no" voting option at the end of a post, to which I'd use the question "Was this post helpful to you?" I can then go into the admin panel to see the total number of yes's and no's per post. Does one like that exist? I've found a multitude of "Digg-like" up/down plugins, but they are far too complex for what I'm looking for. I've looked at Vote-It-Up and WP-Polls, 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. Thanks in advance for the suggestions.


title: Ajax post filter by taxonomy

text: I want to make a filter width more than one tanonomy width ajax and jquery, The demo i want to code is: http://gycweb.org/resources/ I have tried to code with this demo: http://dinhkk.com/demo/ajaxfilter/ The problem is i can send in formation from two menu on right sidebar to the ajax data at the same time can any one help me the solution ??


title: Multiple custom post types on same admin page

text: Here's my situation.... I'm creating a plugin that will allow families to register on the site I'm working on. Each family will have 1 or more children that they need to add to their registration. My initial thought was to make 2 custom post types - Family and Child and relate them either through metadata or through a custom table (1 to many joins). My question is, is it possible in wordpress to create an admin page that would allow adding and/or editing of a family and all of the related children in one place (including adding, removing, and editing children as necessary)? If so, are there resources out there that can show me how to do it? Thanks, Jon


title: Gallery Only Displaying One Thumbnail

text: My image galleries are showing only one thumbnail in the post the gallery sits in. http://themeforward.com/demo2/2013/03/08/image-gallery/ **My single.php markup can be found here:** http://snippi.com/s/akm5jb7 Additionally, previous_image_link and next_image_link are not displaying when the image is clicked (these would lead to the other images in the gallery). **My entire image.php markup can be found here:** http://snippi.com/s/ajwa5yh **My gallery shortcode:** `[gallery link="post" ids="2245,2246,2247"]`


title: Revamping a Wordpress mirror site - and I don't know where to start!

text: I have taken on a job at a language school in Spain that has asked me to revamp their website for them. From what I know, the previous designer has done a runner with the details of everything but the wordpress login itself - server info gone,plus domain rules, so all I can access is the dashboard and other sections on this page. The boss has asked that I "play around with the design a bit", change to template etc to better fit the needs of the company. I know how to change things, but I'm afraid of doing that as it will change all of the live site dramatically, and I need to make a dummy run before publishing. Tomorrow I'm going to sit her down and tell her that I need to know what style she wants, but this is a pre-emptive strike against the boss. I have until the weekend to learn how to dramatically change and fix problems in wordpress? Where can I start? Any suggestions?


title: pagenavi issue on multi wordpress insall

text:
Apologies in advance for my explanation of this problem. I've got one install of wordpress running several different websites. The actually problem is with the pagenavi function. It seems to work on the main site that is running the wordpress install but not the sub websites that are just pulling in the functions and wordpress files via PHP. The function for the main website generating the page-nav is the following               function wpld_pagenavi_search() {         global $wp_query, $wp_rewrite;         $pages = '';         $max = $wp_query->max_num_pages;         if (!$current = get_query_var('paged'))             $current = 1;              $a['base'] = ($wp_rewrite->using_permalinks()) ? user_trailingslashit(get_pagenum_link(1) . '&page=%#%', 'page') : @add_query_arg('page', '%#%');         if (!empty($wp_query->query_vars['s']))             $a['add_args'] = array('s' => get_query_var('s'));              $a['total'] = $max;         $a['current'] = $current;              $total = 1; //1 - display the text "Page N of N", 0 - not display         $a['mid_size'] = 5; //how many links to show on the left and right of the current         $a['end_size'] = 1; //how many links to show in the beginning and end         $a['prev_text'] = '« Previous'; //text of the "Previous page" link         $a['next_text'] = 'Next »'; //text of the "Next page" link              if ($max > 1)             echo '
';         if ($total == 1 && $max > 1)             $pages = 'Page ' . $current . ' of ' . $max . '' . "\r\n";         echo $pages . paginate_links($a);         if ($max > 1)             echo '
';     }      The subsites use the same function to generate the same layout of the pagenavi. It generates find but the pages it links through don't exist. I'm stuck as to why it doesn't pull in the correct pages as it works on the main site. Main Site Page with pagenavi at the bottom - This is page 2 that works fine. Subsite page with pagenavi at the bottom - This is page 2 that displays a broken page. Thanks for any help.


title: How do I query based on the modified date?

text: I would like to list posts by the "modified" date not the published date. Is there a way to do this?                       $documents = array('posts_per_page' => 10, 'post_type' => 'documents',);             query_posts( $documents );             get_template_part( 'loop', 'docid' );             wp_reset_query();


title: Check if meta key value already exists

text: Let's say that I have few posts with meta key "videoid". Value of that meta key is different for every post (and has to be different). When adding new post, how can I check if videoid with that exact value already exist for some older posts? I used this as a refference for adding custom meta box to admin area of WP: http://codex.wordpress.org/Function_Reference/add_meta_box


title: Buddypress: Load Ajax Without Template Pack

text: How can I load buddypress ajax without using the template pack plugi n? I had this in a non-buddypress compatible theme's functions.php.               include( BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php' );               function mytheme_enqueue_bp_default_js() {     wp_enqueue_script( 'dtheme-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ), bp_get_version() );          $params = array(         'my_favs'           => __( 'My Favorites', 'buddypress' ),         'accepted'          => __( 'Accepted', 'buddypress' ),         'rejected'          => __( 'Rejected', 'buddypress' ),         'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),         'show_all'          => __( 'Show all', 'buddypress' ),         'comments'          => __( 'comments', 'buddypress' ),         'close'             => __( 'Close', 'buddypress' ),         'view'              => __( 'View', 'buddypress' ),         'mark_as_fav'       => __( 'Favorite', 'buddypress' ),         'remove_fav'        => __( 'Remove Favorite', 'buddypress' )     );     wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params );     }     add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_bp_default_js' );


title: how can get database name in wordpress?

text: I want to get WordPress database name. I have also try to get database name from $wpdb but failed. When print the $wpdb it give an object array but i don't know how to get database name from object array.


title: Help me fix these crazy attachment page URLs (rewrite?)

text: On one of my sites if a post's permalink is as follows:               http://example.com/side-view-of-sheikh-zayed-grand-mosque-in-abu-dhabi-united-arab-emirates/      the attachment page for the thumbnail image (i.e. featured image) will be like this:               http://example.com/side-view-of-sheikh-zayed-grand-mosque-in-abu-dhabi-united-arab-emirates/side-view-of-sheikh-zayed-grand-mosque-in-abu-dhabi-united-arab-emirates-2/      In other words, the attachment page URL is a repetition of the parent post's URL (sometimes with a '2' slapped on it at the end like in the example). I want to make the attachment page URLs like this:               http://example.com/post-url/artwork-detail/      I also pass GET parameters to the attachment pages like this:               http://example.com/post-url/post-url?size=400      I want this to become:               http://example.com/post-url/artwork-detail/size-400      The URL duplication is my big concern, the GET translation isn't a priority so long as the parameters aren't lost.


title: Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis

text: I've created a custom post type for employee Profiles. The one thing I can't (yet) figure out is how to make custom sidebars for each of the employee's profiles. I have figured out 2 ways to get custom sidebars, but they are not what I want. ( 1.Simple Sidebars plugin; 2.custom code applied to single- profile.php and functions.php) I'm trying to set it up so the site owner doesn't have to go into widgets to edit a sidebar, but rather can edit it within the Profile editor. I guess what I need to do is 'display custom fields outside the loop'? Then I can use the Advanced Custom Fields plugin to create the fields for the sidebar which will be editable within the editor for the profile CPT. I'm using Genesis. I'm not referring to metaboxes with dropdowns for sidebar widgets, or sidebar widgets at all, but a way to submit content and a profile image (using Advanced Custom Fields?) within the individual profile editor screen, then a way to output that information individually to the Profile CPT sidebars. Each profile should have a unique sidebar (unique to each employee.) Thanks!!


title: Plugin to load theme if mobile and specific page

text: I've been browsing some of the other questions and I haven't been able to find a solution. There was a great solution to part of my problem that I'm basing this code on. I need to detect if on mobile, and display the mobile theme with one exception. If a user is on mobile and on page ID 145 the normal theme needs to be used. This is the code I have that works, except does not display the normal theme on that specific page on mobile. I've tried some variations with no luck. Thanks for looking.               add_filter('template', 'change_theme');     add_filter('option_template', 'change_theme');     add_filter('option_stylesheet', 'change_theme');     function change_theme($theme) {         if ( wp_is_mobile() ) {             $theme = 'SelectThemeMobile';              }               elseif ( is_page( 145 ) && wp_is_mobile() ) {                  $theme = 'SelectThemeOne';         }              return $theme;     }


title: Show only the grandchildren (using get_terms)

text: I'm working with a hierarchical taxonomy (named "world") that has 3 levels to it (`Regions > Countries > Indigenous Peoples`). At the moment I'm using a modified version of this code to paginate all the results on a single page. Here's the important part               $page = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1;     // number of tags to show per-page     $per_page = 24;     $offset = ( $page-1 ) * $per_page;     $args = array( 'number' => $per_page, 'offset' => $offset, 'hide_empty' => 1,'hierarchical ' => true     );      and               $taxonomy = 'world';     $tax_terms = get_terms( $taxonomy, $args );      As expected, this returns a paginated list of all the terms associated with my taxonomy. The problem is, I only actually need to show the grandchildren, in this case, `"Indigenous Peoples"`. I'm tempted do it manually, but I'd rather not serve up a list of 450+ terms to include (or 80 terms to exclude) unless it's absolutely necessary. Your help would be most appreciated.


title: Guest authors, sort of like Wikipedia, but more theme-able

text: My first post on WordPress SE. 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. 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. 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. Thanks.


title: W3 Cache plugin and Facebook sharing

text: _**_LATEST UPDATE (June 13th 2012)** I can't figure out what's wrong with my codes. When I want to share one of my blog posts and use either the Facebook share button or copy the link of the blog post directly into Facebook all that pops up is the URL itself, not the meta info such as description or featured image! I filled out the meta data for each and every post and I also added Open Graph to my code. Yet, when I try to share my blog post links on Facebook, neither the meta description nor a thumbnail would show up for the majority of my blog posts. It's like something is blocking the information. I've run out of ideas. I really hope you guys can help me figure out what's wrong! (obvioulsy I replaced the fillers above with my own data!) I also used the Facebook Debugger and all it tells me is: > Can't Download: Could not retrieve data from URL. **Updated Information:** I finally was able to figure out what was wrong thanks to Milo and MathSmath! The W3 Cache Plugin is interfering with the Facebook sharing progress, but it's quite easy to change that. Scroll down to see my answer! Works like a charm!


title: Wordpress CMS - hide content from public while in editing stages

text: 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. Can anyone suggest a good way to prevent access to the public (for example a "coming soon" 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). 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.


title: Password in wp-config. Dangerous?

text: I don't know a lot of Wordpress yet, and I'm just wondering: Before installation you have to fill in the correct data in `wp-config- sample.php` but this also includes the database password. Isn't that dangerous? I mean, can some one explain how this is protected from just reading the file and thus getting the password of your DB?


title: Looking for WordPress System Diagrams

text: I am looking for WordPress chart/diagram system design. I found only the template hierarchy diagram, but it's only part of the system. ![enter image description here](http://i.stack.imgur.com/4vfuq.png) source: http://upload.wikimedia.org/wikipedia/commons/3/3d/Wordpress_Template_Hierarchy.png


title: What's a good strategy for planning WordPress DB growth?

text: Hoping for some feedback on the topic of optimizing and staying on top of performance as a WordPress database grows... to paint a picture.... let's say you have a WordPress / Buddypress MU site that begins at around 150kb (vanilla install)... over time users add blogs, forums, posts, and comments and the database grows to 5mb.... then 10mb the next year.... Also assuming that hosting controls are a standard colocated setup such as Cpanel or Plesk.   * At what point does the number of entries in the database impact performance of the front-end website?   * What can you do as a website manager to keep this running smoothly as your database grows?   * What can you expect in terms of performance after year 5 when your database is 500 - 600mb big? Thanks for any feedback you might have on keeping a tight ship. Regards, S.


title: Finding difference in days

text: I want to store the current time using the update_option and then compare it if the set time was 3 days ago. I want to know in what `format` I should store the time? and then how can I compare it with current time and find the difference in the days?


title: How to find meta entries with their posts missing via SQL?

text: I'm looking to write an SQL query to do the following: Select all postmeta rows where the meta_value = a post id that does not exist. For example, postmeta meta_value may equal 235. Usually this would relate to a post (attachment) with 235 as an ID, however, it has been deleted. I want to find any postmeta rows like this and remove them. Hope this makes sense! Thanks in advance. EDIT: I've just found the NOT EXISTS function. I have a feeling something like this would work:               SELECT m.*     FROM wp_postmeta m     WHERE m.meta_key = 'image'     AND NOT EXISTS (SELECT *         FROM wp_posts p         WHERE m.meta_value = p.ID)       Does this look right?


title: How to change the default class for the widget title?

text: I would like to change the default class of the widget title. Currently it is h2 and I would like it to be h3. I have seen there is the option of customizing css so that h2 looks like h3.               #sidebar h2 {     font-size: 24px;     }      But then, this may cause a problem if I modify h3 later, h2 will not follow the changes. And I also saw this discussion How to add class on Widget Title about how to create a register a new widget. But I would like to apply it to the default widget, not register a new one... Thanks for your help


title: Why are my comments closed?

text: I have a simple site with a few pages plus a blog. For some reason, the blog posts state **comments are closed** and I can't figure out why. I want to open the comments on all blog posts (and not offer comments on pages). In the "edit post" screen, the "Comments" section just states "No comments yet." but doesn't offer any way to turn them on. In settings>discussion, I have these: > ON Comment author must fill out name and e-mail   >  OFF Users must be registered and logged in to comment   >  OFF Automatically close comments on articles older than (14) days   >  ON Enable threaded (nested) comments levels (5) deep   >  ON Break comments into pages with (50) top level comments per page and ... > > OFF Before a comment appears An administrator must always approve the > comment   >  ON Comment author must have a previously approved comment > > ON Hold a comment in the queue if it contains (1) or more links.


title: Adding set of custom fields to Wordpress Post in Dashboard

text: I am working on a WordPress site and while creating a new posts we have certain number of custom attributes which are always part of the post, as of now we need to manually add those all custom fields while creating the post. I am looking a way so that when we click on the new post link the template should come with this set of default custom fields with default values and admin can change them if he/she want to change any default value. i know that there are few plugins, but i do not want to use those plugins in mean time i also have to take care that this new functionality should not break any thing as we already have thousands of published posts and i do not want them to get affected by this functionality. Any suggestion or pointer in this regard will really be helpful.


title: Print Cforms form as pdf

text: I have created a form using Cforms from Delicious. The client asked me for an option to print this form as a pdf. I tried some plugins such as Print Friendly and PDF Button that make it possible to add a pdf or print button, but this button is subsequently added to all pages and most of the time the form does not appear on the print preview /printout. Does anyone know how I can do this?


title: How do I add my PHP app to a Wordpress page whilst keeping semantic URLs?

text: I am rebuilding a static website for a client using Wordpress on the main domain- eg domain.com. There is also a directory of members website at directory.domain.com which I was hoping to migrate over to the main website- `domain.com/directory/` _(We want to do this, firstly to keep it on the same domain, but also so that we may be able to use the same layout and styles- preferably by using a page template.)_ The app has a main page, a list view and a member details view, and search queries are sent using `$_GET`. URLs are made to look nice (semantic URLs) by using mod_rewrite eg: `directory.domain.com/list/people/all/by- name/page-1/20-per-page/` example code from the .htaccess file could be: `RewriteRule ^list/([a-zA-Z0-9-\-]+)/([a-zA-Z0-9-\-]+)/([a-zA-Z0-9-\-]+)/$ /list.html?member-type=$1&area-name=$2&order-by=$3 [L]` I've thought of two possibilities in which to achieve the above... 1) If we kept the directory of members on the different subdomain then it might be possible to cache and use a copy of a blank page on the WP site and then use this as a template for the directory of members. 2) Somehow have the php code of the directory of members within a WP page. Ideally I want to go for (2), but I am not sure how to implement this. So what's the best way to achieve this? Specifically...   * How do I run the PHP for the app within a WP page?    * How do I access the $_GET variables and enable nice (semantic) urls using mod_rewrite? For example, if the directory is on `domain.com/directory/` how do I get it to pass `$_GET` variables by extending the url but keeping the same WP page, eg. `domain.com/directory/list/people/all/by-name/page-1/20-per-page/` ? Sorry if I haven't explained this very well, it's a little complicated!


title: Can't login to wordpress despite changing password to something known directly in MySQL or using "Password Reset by Email" feature

text: I'm unable to login to my wordpress site v3.1.3 even though I know the password. To be extra sure, I directly changed the password for the user account (ID=1) with               UPDATE wp_users SET user_pass="(MD5-hash-of-pwd)" WHERE ID = 1;      I've verified that:   1. ID=1 is my user account   2. Triple checked that the MD5 hash is correct for the password I am setting it for   3. Quadrupled checked that my user_login name is the one I'm using I then go to my wordpress login and am told that my username and password is incorrect. I also tried using the "forgot password" 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 **different** when I generate it with and online MD5 tool vs. the password reset flow. I've verified on the wordpress site that they state they use MD5 for pwd hashes: http://codex.wordpress.org/Resetting_Your_Password What's going on?!


title: How do I display logged-in username IF logged-in?

text: I'm working on creating some text that says 'Login' to users that are not logged in, and the user's username or display name when logged in. It seems like it should be an easy problem to solve, and I've found the following two bits of code on the wordpress codex that each do half of what I am looking for, but I haven't figured out how to combine them (without breaking the site). Is this the correct direction, or way off base? **To check if the user is logged in and display something different depending:** `<?php if ( is_user_logged_in() ) { echo '{username code here}'; } else { echo 'Login'; } ?>` **To get and display the current user's information:** `<?php global $current_user; get_currentuserinfo(); echo 'Username: ' . $current_user->user_login . "\n"; echo 'User display name: ' . $current_user->display_name . "\n"; ?>`


title: How do you make a custom post type items automatically delete items 3 months after publication?

text: I'd like somer code that I can place in my `functions.php` file that will only modify the specified custom post type. I have already tried several plugins, but all of them have more features than I need. It's overkill to mess with things I don't want them to mess with. Ideally, the code will:   * Set up a daily cron job for 00:00 (at night)   * Fire a custom function that queries the database for the custom post type and compares its publication date with current date.    * If the custom post type is older than 3 months (the custom function returns true), then it will call `wp_delete_post()` for the post's ID. Unfortunately, I can't put it all together myself. Is there a good (simple) plugin that does this? A code snippet you have off the top of your head?


title: Setting custom cookies in Wordpress

text: I am trying to set cookies to re-route returning users to my a specific page within my Wordpress site. I'd like some advice with these 2 things:   1. 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?    2. How do I properly set a cookie within Wordpress? `setcookie('cookie_name', 'cookie_value', time()+4000);` doesn't seem to be saving any cookies to my system.


title: How to find a run away wordpress plugin causing performance problems

text: My shared hoster is continually disabling my site as it appears there is a run away plugin that is pegging mysql. In their logs, I'm seeing these:               # Wed Jun 29 00:00:33 2011     # Query_time: 22.923943  Lock_time: 4.941786 Rows_sent: 100  Rows_examined: 808400     use FOO_wrdp2;     SELECT * FROM wp_slimex_stats LIMIT 808300, 100          # Wed Jun 29 00:00:38 2011     # Query_time: 4.485267  Lock_time: 0.000093 Rows_sent: 100  Rows_examined: 808500     use FOO_wrdp2;     SELECT * FROM wp_slimex_stats LIMIT 808400, 100          # Wed Jun 29 00:00:39 2011     # Query_time: 1.409544  Lock_time: 0.023081 Rows_sent: 100  Rows_examined: 808600     use FOO_wrdp2;     SELECT * FROM wp_slimex_stats LIMIT 808500, 100      Notice the `wp_slimex_stats` mention and teh large query times. This is the part that's raising red flags for my shared hoster. `wp_slimex_stats` 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. 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). How in the world do I debug this to track down where the plugin actually is so I can disable it?


title: Using Zurb's Foundation Tabs as Wordpress Nav (Active Tab)

text:
This is a question more geared towards those of you out there that have experience working with the popular SASS/JS Framework, Foundation by Zurb. I am trying to use it as my structural core to my new Wordpress theme and had a question... Built into Foundation are stylings for buttons, forms, and of course the famous 12-column grid. However, it also comes with jQuery Tabs that can be used to display tabbed content! Well, I wanted to use these to display my theme's navigation and have no clue as to where to start. Currently, I have the below in place:

                     Home

                     About

                     Contact

Home Page?

About Page?

Contact Page?

                    Again, I'm just beginning with the Foundation framework and as I can tell, this is correct to display the actual tabs... however, this is just for pure content within the tab - NOT a link to a new part of the site that will show an active tab for that section. How can I use this Foundation Tab logic and meld it with Wordpress so when a user clicks on it, it loads that part of the site and show the correct "active" tab per page. Examples:   * User clicks on "News" > An Article and is on single.php. The "News" tab should remain "active" while in the News section of the site.   * User clicks on "Contact" which loads a Wordpress page containing a contact form. "Contact" tab is active.   * etc Any and all help would be greatly appreciated. If you're unclear on what the Foundation Framework is, click here to be taken to their Documentation center and the section on Tabs. I'm honestly at a lose and it's probably in front of me... figured I'd open a conversion to see if someone sees it. LOL Thanks all!


title: Register page in admin area

text: Ok, so I have a table in my admin area for my plugin. Each row as an edit button, which should post to the edit page. I don't know how to add my php edit page to the registered wordpress page, though, so I don't know what to put for action in the form.                       <td><form action="[edit.php]" method="post">                     <input type="hidden" id="<?php echo $issue->id?>" name="id" value="1">                     <input type="submit" value="Edit">                 </form>             </td>      So what should I put inside the brackets (and yes, I will remove the brackets), and where/how do I add edit.php so wordpress knows it exists? UPDATE: So apparently I just add edit.php normally, but specify null for its parent. Stil no idea what to put in those brackets. UPDATE 2: Apparently the function I was looking for was menu_page_url...


title: How do you Permanently Delete Sidebars

text: I'm developing a custom theme and I added some widgetized sidebars like so:               register_sidebars(2, array('name'=>'Foobar %d'));      I then recreated them so that I could give them semantic names. Like so:               register_sidebar(register_sidebar(         array(             'name' => 'Sidebar'         )     ));     register_sidebar(register_sidebar(         array(             'name' => 'Sub Menu'         )     ));      But now in my admin area I see 4 sidebars. How do I delete the two older sidebars? I can unregister them using `unregister_sidebar` but I don't want to keep those 2 lines of code in my theme forever. I found this in the DB under `wp_options` under `sidebars_widgets`. It looks like they are indeed saved in the DB. Do you have any idea which bits to delete?               a:6:{s:19:"wp_inactive_widgets";a:0:{}s:9:"sidebar-1";a:3:{i:0;s:14:"recent-posts-2";i:1;s:10:"archives-2";i:2;s:12:"categories-2";}s:9:"sidebar-2";a:0:{}s:9:"sidebar-3";a:1:{i:0;s:21:"subpages-in-context-2";}s:9:"sidebar-4";a:0:{}s:13:"array_version";i:3;}      Thanks,


title: Add additional Network constants to wp-config.php dynamically

text: When starting with a fresh Network install, the first step is a single site install that has one additional line in the `wp-config.php` file:               define( 'WP_ALLOW_MULTISITE', true );      After that we have to go to `Tools > Network Setup`, enter some details like network name and super admin email and finally hit the button to run the setup. The next step the pops up is actually two steps:   1. Add _additional_ constants to your `wp-config.php` file              define( 'MULTISITE', true );     define( 'SUBDOMAIN_INSTALL', true );     define( 'DOMAIN_CURRENT_SITE', 'example.com' );     define( 'PATH_CURRENT_SITE', '/' );     define( 'SITE_ID_CURRENT_SITE', true );     define( 'BLOG_ID_CURRENT_SITE', true );        2. Add some rules to your `.htaccess` file. As I don't do single site installs (no reason for that anymore), I'd like to add those constants dynamically to my `wp-config.php` file:               define( 'WP_ALLOW_MULTISITE', true );     if ( SOME_CHECK_IF_STEP-1_WAS_PASSED )     {         define( 'MULTISITE', true );         define( 'SUBDOMAIN_INSTALL', true );         define( 'DOMAIN_CURRENT_SITE', 'example.com' );         define( 'PATH_CURRENT_SITE', '/' );         define( 'SITE_ID_CURRENT_SITE', true );         define( 'BLOG_ID_CURRENT_SITE', true );     }      So I don't have to go to the `wp-config.php` each time and edit it again. The _1st_ thing that came into my mind was to check the DB for the `{$wpdb->prefix}sitemeta` table, but I don't want to do an additional query on each site load. The _2nd_ thing I thought of was to check if the `blogs.dir` already exists, but that's not the case. > **Question:** How can I indicate that I already passed the first step of the > network setup in way that doesn't has a massive overhead or decreases > performance.


title: password_reset hook is not working

text: I am developing a plugin where a MySQL user is created with username same as WP-username and password is entered by user using form . Now If the user resets its password in WordPress then the same password should be set in MySQL user. for that purpose I tried to use password_reset hook but it is not working Code: I use this code in init               add_action('password_reset',array(&$this,'my_reset_password'),10,2);      and define the function as:               function my_reset_password($user, $new_password)     {              $data=array('slave_name'=>$new_password);         $where=array('site_user_id'=>$this->user_id);         $res=$this->update_data(TABLE_PREFIX.'slaves',$data, $where);         //return $res;         //var_dump($new_pass);         //$this->flag=$new_pass;          }      The above code runs successfully as individual but when hooked with password_reset it is not working. suggestions with code samples will be appreciated.


title: Change My Basket text in the header of WooCommerce Artificer theme

text: I'm using WooCommerce with free Artificer theme and I'm trying to change the text for **My Basket** and **Checkout** shown on image below: ![enter image description here](http://i.stack.imgur.com/CvA0S.png) Now, I've searched the localization files for any string matching My Basket (all possible variations) and came to conclude that this isn't possible to translate using language file. Since this basket information is visible on every page I went to look into the **header.php** file in the **themes/artificer** folder and comparing to the HTML output (using Dev tools in Chrome) I came to believe the output is controlled by this line:               <?php woo_nav_before(); ?>      But, now I've spent some reasonable amount of time googling and searching the template files for where this function is defined but I can't find it for the life of me, so can someone please point me in the right direction.


title: How do I set up the defualt page icon for admin menu?

text: What do i Change this to So its shows the default page icon?`', plugins_url( 'myplugin/images/icon.png' )`                add_menu_page( 'Info', 'Info', 'manage_options', 'LINK', '', plugins_url( 'myplugin/images/icon.png' ), 10 );      I find out how to do this. Step 1. Screenshot or find the image you like. Step 2. Name it icon.png step 3. Create a folder myplugin inside the plugin folder and then create inside that folder images folder and then put the icon.png image inside the image folder and thats it. in short plugin > myplugin > image > icon.png


title: Custom Login Page -- wp_signon Headers Already Sent?

text: 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:               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      twentyeleven\header.php:13 shows this (lines above and below included):               <!--[if IE 6]>     <html id="ie6" <?php language_attribute(); ?>>     <![endif]-->      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:               //Retrieve submitted $_POST values.     //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)     //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:     if (!get_userdatabylogin( $submitted['email'] ))          $errors['emailIsValid'] = false;     else     {          $user_data = get_userdatabylogin( $submitted['email'] );          $password_hashed = $user_data->user_pass;          if (wp_check_password($submitted['password'], $password_hashed, $user_data->ID))          {               $credentials = array();               $credentials['user_login'] = $submitted['email'];               $credentials['user_password'] = $submitted['password'];               if (empty($submitted['rememberme']))                    $credentials['remember'] = false;               else                    $credentials['remember'] = true;               wp_signon($credentials, true);          }          else               errors['passwordMatchesEmail'] = false;     }     //Check to see if the errors array has any flags, if so flag a variable to say errors exist     //Form code: form submits to itself     //Check error flags and display error message accordingly     //Display body of form      Everything works perfectly except for that `wp_signon` line. Entering the correct credentials yields the error I mentioned above.


title: Search page results conflicting logic - Search result caching?

text:
I recently stylized my search page results from the base template _S, and got everything to work quite nicely. I've developed it to return false/positive header/body. It should only return a positive header if there are actual results found, and then the positive body should contain those results, otherwise, it should return the false versions of the two of them. However, with some queries (which should be getting search results) somehow return a "positive" header, and for whatever reason, a "negative" body (telling the user that there are no search results). Strangely enough, I've tested other words, and those words act as they should, with the proper false/positive responses being returned. You can check it out here. On my site, you can try searching for something like "Shortcodes", and will return up with a positive header which says something along the lines of "Search Results for: Shortcodes" and will then list the results that it found, whereas if you search for something like "Search", it will return that positive header for there being posts there, but it won't render out any posts, and instead render out the negative body, which tells you that there are no search results. (Even though I have made a post about "searching" recently... which is perplexing. My search.php is:               <?php     /**      * The template for displaying Search Results pages.      *      * @package League Of Legends: Rift      */          get_header();           if ( have_posts() && $pco_rift['opt-search-sidebar']['2'] || !have_posts() && $pco_rift['opt-search-sidebar']['1']){         $sidebar_active = true;     }      ?>         <?php if ( have_posts() ) : ?>             <?php if ( have_posts() ) : the_post(); ?>
<?php printf( __( ' Search Results for: %s', 'league-of-legends-rift' ), '' . get_search_query() . '' ); ?>
                                  <?php endif; ?>         <?php else : ?>
<?php _e('Nothing Found', 'league-of-legends-rift')?>
                      <?php endif; ?>
             <main id="main" class="site-main" <?php if(!$sidebar_active){ echo 'style="margin: 0" '; } ?>role="main">                  <?php if ( have_posts() ) : ?>                      <?php /* Start the Loop */ ?>                 <?php while ( have_posts() ) : the_post(); ?>                          <?php                     /**                      * Run the loop for the search to output the results.                      * If you want to overload this in a child theme then include a file                      * called content-search.php and that will be used instead.                      */                     get_template_part( 'content', 'search' );                     ?>                 <?php endwhile; ?>                 <?php league_of_legends_rift_paging_nav(); ?>             <?php else : ?>
<?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'league-of-legends-rift' ); ?>
                 <?php get_search_form(); ?>             <?php endif; ?>
     <?php      if($sidebar_active){     get_sidebar();     }      get_footer();     ?>      I've setup a sidebar active thing at the top, and what it does is it will not render the sidebar if there are no search results (because this code will render out a nice long search bar, which I don't want to cause the duplication of the one in the sidebar). Interestingly enough, my other random queries like "gaspdiojfapsoidfjasdf" will return everything correctly (negative header, negative body). Thanks, Adam


title: Sorting by meta_key different to search criteria?

text: I've created an admin only page simply to view more information about subscribers to my website. The subscriptions are stored as Custom Post Types. All I want to do is make a condition that looks up a list of cancelled subscribers and orders them by the expiry of the subscription. The subscription expiry is stored as yyyymmdd as a meta tag on the post. There are a few pages about this, but I cannot get any solution to work in my instance and it's probably because I'm doing something stupid. The two I have tried are:                    $args=array(                 'post_type' => 'subscription',                 'post_status' => 'publish',                 'meta_key' => 'expiry',                 'orderby' => 'meta_value_num',                 'order' => 'DESC',                 'posts_per_page' => -1,                 'caller_get_posts'=> 1,                 'meta_query' => array(                                       array(                                             'key' => 'paypal_recur_profile_status',                                             'value' => get_post_meta(get_the_ID(),'cancelled',true),                                             'compare' => '='                                             )                                            ),                 );      and                $args=array(             'post_type' => 'subscription',             'post_status' => 'publish',             'meta_key' => array('paypal_recur_profile_status', 'expiry'),             'meta_value' => 'Cancelled',             'orderby' => 'expiry'             'order' => 'DESC',             'posts_per_page' => -1,             'caller_get_posts'=> 1,             );      The first returns nothing, the second seems to do ok but has some anomalies in it so assume it ends up ordering it by post number and the other correct order results are coincidental. Can anybody spot the un-deliberate mistake in here or is this simply the wrong way to achieve what I'm trying to do?


title: using next-page and previous page inside a wp_query

text: I'm using a wp_query on my website to display a list of child pages from a parent page. It works fine and my pages are sorted by a meta_key using a custom field. Now I would like to add a next page (when there is one) and a previous page (when there is one) on my pages using the same arguments, children page from 22, order ASC and orderby and meta_key. Here is my wp-query :               <?php                      $args = array(                 'post_type'      => 'page',                 'posts_per_page' => -1,                 'post_parent'    => '22',                 'order'          => 'ASC',                 'orderby'=>'meta_value',                 'meta_key'=>'nom_de_loeuvre'                 );                      $parent = new WP_Query( $args );                      if ( $parent->have_posts() ) : ?>                      <span class="styled-select">                          <select name="" onchange="location = this.options[this.selectedIndex].value;">                          <option>A - Z</option>                               <?php while ( $parent->have_posts() ) : $parent->the_post(); ?>                                       <option value="<?php the_permalink(); ?>" title="<?php the_title(); ?>">                             <?php the_field('nom_de_loeuvre'); ?>                             , de                              <?php if(get_field('prenom_artiste')): ?>                             <?php the_field('prenom_artiste'); ?>                             <?php endif ;?>                             <?php the_field('nom_artiste'); ?> | Galerie                              <?php if(get_field('prenom_galerie')): ?>                             <?php the_field('prenom_galerie'); ?>                             <?php endif ;?>                             <?php the_field('nom_galerie'); ?>                                  </option>                                    <?php endwhile; ?>                               </select>                      </span>                                <?php endif; wp_reset_query(); ?>      I can't find how to do it, depending on what I tried I get the previous and next link working, but not sorted depending of my meta_key, or I get all the kinks displayed on my page... Can anybody help me with this? I don't want to display the next or previous page title but I'll use custom text "next" & "previous" Thanks a lot for your help.


title: Open wordpress gallery onclick

text:
I'm using Fancybox with wordpress' built in gallery to display the images on my site. This is working great. However - due to the layout of my site, it's not very clear that the one image displayed is a gallery. To make it clear I want to put a 'open gallery' link beside the image. For example - ![enter image description here](http://i.stack.imgur.com/EbHPz.png) My question is - is it possible to open the gallery through a link, not a thumbnail? This is the code I have been playing around with - HTML               [gallery link="file" columns="4" ids="174,175,176,173"]
open gallery
      JS               $("#launcher").on("click", function(){     $(".fancybox").eq(0).trigger("click");     });      Here is my site


title: How to add an admin notice upon post save/update

text:
I have a post type the uses post_save to take the address from the post-meta and retrieve the lat/lng coordinates from the Google API. I need a way of notifying the user if there was an issue with retrieving the coordintes. I tried using admin_notices, but nothing displayed:               public static function update_notice() {       echo "

Failed to retrieve coordinates. Please check key and address.

";       remove_action('admin_notices', 'update_notice');     }          add_action('admin_notices', array('GeoPost', 'update_notice'));      I'm not sure if I'm using it incorrectly or in the wrong context. To be clear, in the actual code the add_action is in another function in the same class. That's working fine.


title: Instance not inserting data for widget

text:
I am trying to create a widget for my website. This is my first instance of widget creation and I am really unsure as to what the issue is Here is my code as it stands:               add_action( 'widgets_init', 'wy_rss_widget' );          function wy_rss_widget() {         register_widget( 'WY_rss_widget' );     }          class WY_rss_widget extends WP_Widget {              function WY_rss_widget() {             $widget_ops = array( 'classname' => 'wy-rss', 'description' => __('A widget for displaying RSS feed', 'wy-rss') );             $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'wy-rss-widget' );             $this->WP_Widget( 'wy-rss-widget', __('RSS Widget', 'wy-rss'), $widget_ops, $control_ops );         }              function widget( $args, $instance ) {             extract( $args );                  //Our variables from the widget settings.             $title = apply_filters('widget_title', $instance['title'] );             $wy_rssURL = $instance['wy_rssURL'];             $wy_rssLimit = $instance['wy_rssLimit'];                  echo $before_widget;                  // Display the widget title              if ( $title ) {                 echo $before_title . $title . $after_title;             }                  //Display the name              if ( ( $wy_rssURL != " " || $wy_rssURL != "FEED URL" ) && ( $wy_rssLimit != " " ) ) {                 $rss = new DOMDocument();                 $rss->load($wy_rssURL);                 $feed = array();                 foreach ($rss->getElementsByTagName('item') as $node) {                     $item = array (                          'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,                         'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,                         'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,                         'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,                     );                     array_push($feed, $item);                 }                 $limit = $wy_rssLimit;                      echo '
';                 echo '
'.$wy_rssURL.' ('.$limit.')
';                 for($x=0;$x<$limit;$x++) {                     $title = str_replace(' & ', ' & ', $feed[$x]['title']);                     $link = $feed[$x]['link'];                     $description = $feed[$x]['desc'];                     $date = date('l F d, Y', strtotime($feed[$x]['date']));                          echo '
';                     echo '
'.$title.'
';                     echo 'Posted on '.$date.'
';                     echo '
'.$description.'
';                     echo '
';                 }                 echo '
';             }                  echo $after_widget;         }              //Update the widget               function update( $new_instance, $old_instance ) {             $instance = $old_instance;                  //Strip tags from title and name to remove HTML              $instance['title'] = strip_tags( $new_instance['title'] );             $instance['wy_rssURL'] = strip_tags( $new_instance['wy_rssURL'] );             $instance['wy_rssLimit'] = strip_tags( $new_instance['wy_rssLimit'] );                  return $instance;         }                   function form( $instance ) {                  //Set up some default widget settings.             $defaults = array( 'title' => __('Title', 'wy-rss'), 'wy_rssURL' => __('FEED URL', 'wy-rss'), 'wy_rssLimit' => __('5','wy-rss') );             $instance = wp_parse_args( (array) $instance, $defaults ); ?>
                 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title:', 'wp-rss'); ?>                 <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" style="width:100%;" />

                 <label for="<?php echo $this->get_field_id( 'wy_rssURL' ); ?>"><?php _e('URL:', 'wp-rss'); ?>                 <input id="<?php echo $this->get_field_id( 'wy_rssURL' ); ?>" name="<?php echo $this->get_field_name( 'wy_rssURL' ); ?>" value="<?php echo $instance['wy_rssURL']; ?>" style="width:100%;" />

                 <label for"<?php echo $this->get_field_id( 'wy_rssLimit' ); ?>"><?php _e('Number of items:', 'wp-rss'); ?>                 <input id="<?php echo $this->get_field_id( 'wy_rssLimit' ); ?>" name="<?php echo $this->get_field_id( 'wy_rssLimit' ); ?>" value="<?php echo $instance['wy_rssLimit']; ?>" />
              <?php         }     }      The value for 'wy_rssLimit' is not being stored, where the values for 'title' and 'wy_rssURL' are. I am really not sure where to look. Could someone please help?


title: Cron job to delete post by title

text: I've searched a lot and I didn't find nothing that could help me. So, I want a cron job to automatically delete posts that have no title. Why I want that? I have a IFTTT recipe that automatically post from facebook on my wordpress website. But there are to many posts that I don't want in my site, and these posts are published without title. Sorry about my english, and I don't uderstand wp-cron very well, if the answer could be well specified I thank.


title: WordPress Plug-in Development In MVC Architecture, How?

text: 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?


title: Peer Review Plugin for Posts?

text: 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. http://jmo.me/ideas/peer-review-wordpress-plugin a pretty good explanation of what I'm trying to explain.


title: Wordpress membership site for a sports club

text: I am currently building a webpage for a local sports club with 800 members. The features I need in a potential membership plugin is:   1. Member database with name, address, email, phone etc   2. Able to sort the members in different sport categories (football, athletics etc) and subcategories (youth, senior etc).   3. Online payment of annual membership fee.  There are a lot of plugins available, but with slightly different features, so I would appreciate if someone has some insight in plugins that could match my requirements. Or do I really have to learn how to create custom posts? :)


title: How to Move the Author Metabox into the "Publish" metabox?

text: About a year ago I remember seeing a plugin or some code which allowed you to add an author dropdown menu to the post "publishing" metabox instead of it being on its own. I can't seem to find this code anymore and was wondering if anyone knows how to easily do this? In an ideal situation I would like to essentially add an additional row under the "Visibility:" row within the Publish metabox stating "Author:" 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. In any case, I would greatly appreciate to know how this can be done.


title: How do I add Bootstrap and LESS to my migrated WordPress site?

text: I'm migrating a website to WordPress - it uses both Bootstrap and LESS. I found a snippet online for enabling Bootstrap and the outputted CSS via functions.php:               function theme_add_bootstrap() {       wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/third_party/bootstrap/css/bootstrap.min.css' );       wp_enqueue_style( 'style-css', get_template_directory_uri() . '/css/custom.css' );       wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/third_party/bootstrap/js/bootstrap.min.js', array(), '3.0.0', true );     }      This worked successfully on its own. That said, it only accounts for the final CSS that's outputted by my LESS precompiler, which is a pain because I can't see my LESS style changes locally (using MAMP) unless I compile the CSS first. I would like to have the CSS file used in production, and the LESS file used when I'm developing locally. I attempted to do this by adding the following functions underneath the Bootstrap function above:               function less_enqueue_scripts() {       $current_user = wp_get_current_user();            if ( $current_user--->ID == '1' )         wp_enqueue_script( 'lesscss', get_stylesheet_directory_uri() . '/third_party/less-1.5.0.min.js' );     }          add_action( 'wp_enqueue_scripts', 'less_enqueue_scripts' );          function less_filter_stylesheet_uri( $stylesheet_uri, $stylesheet_dir_uri ) {       $current_user = wp_get_current_user();            if ( $current_user--->ID == '1' )         $src = $stylesheet_dir_uri . '/css/custom.less';       else         $src = $stylesheet_dir_uri . '/css/custom.css';       return $src;     }          add_filter( 'stylesheet_uri', 'less_filter_stylesheet_uri', 10, 2 );      But it's causing the site to break. I'm not sure if it's because the second statement in the Bootstrap function is interfering with these functions, or if another issue is the culprit. Would appreciate any insights.


title: Editor/TinyMCE - change double enter key to <br /> and single enter to nothing

text: I have learned over the last year on Stack Overflow that people here prefer I give all details in the beginning instead of answering 12 comments worth of this stuff later. **EDIT: If you don't want to read about WHY I want to do this, skip to the bolded Main Question section below...** **~Background:** I have been working on a site for a large client that wants a great CMS experience once the site is handed over. In other words they don't want to be paying forever for constant tickets to fix this and that or add new content... now having said that the ideal situation discussed in meetings with them and their managers would be to have a way to edit their page content seamlessly, error free. I have been programming web content for a long time now and am proficient in whatever language you can throw at me so don't be afraid to post your answers in whatever means. Because I have been programming on my own now for so long I have become accustomed to my own conventions and usually try to stick to them at all times. One of which is never EVER using CMS systems for anything more than a CMS, NOT!, as a web page IDE/Editor. I believe in making sites my own usual way with full MVC structure built around controllers and used to keep everything clean and concise and redirected through proper HTACCESS routes and handled. Therefore I decided a long time ago that all CMS usages for me would always be exactly that, a content management system. This way when I give the client their fully working system, they themselves can add extra text and images only. No styling. **~Question: Why would you do this?** Clients ALWAYS know nothing about code and consistently try to "help" by adding content and breaking whole sections because of wpautop. I want them to have a simple UI and editor to literally feed nothing but content to my actual web site which pulls WP for its content. I am using Wordpress 3.9.2 which I believe comes with TinyMCE v4+. Ok, so, down to the nitty gritty. **~Main Question:** What I am trying to do here is change the last missing piece of my CMS environment, the editor. So, **how do I change this functionality with Wordpress hooks only and not change any core functionality?** (I assume editing the TinyMCE files would be tampering with core). **~What I Have Tried:** So far I have learned an amazing amount in regards to customization of Wordpress so I don't need any suggestions that simply say turn off wpautop and force_root_block, etc. I have tried it all. **~Visual example of what I want the editor to do:** Ironically now that I am typing this I am noticing that Stack Overflow has the functionality I want. I want my CMS users to be able to hit enter and have no line spacing or p tags inserted. However if they hit enter twice I want a tag to be injected. I have looked around a lot and cannot seem to find it. In regards to my TinyMCE_init within my plugin, this is what I have...               function customize_tinyMCE($in) {         $in['remove_linebreaks'] = false;         $in['gecko_spellcheck'] = false;         $in['keep_styles'] = true;         $in['accessibility_focus'] = true;         $in['tabfocus_elements'] = 'major-publishing-actions';         $in['media_strict'] = false;         $in['paste_remove_styles'] = false;         $in['paste_remove_spans'] = false;         $in['paste_strip_class_attributes'] = 'none';         $in['paste_text_use_dialog'] = true;         $in['wpeditimage_disable_captions'] = true;         $in['plugins'] = 'tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpfullscreen';         $in['content_css'] = get_template_directory_uri() . "/editor-style.css";         $in['wpautop'] = false;         $in['forced_root_block'] = false;         $in['apply_source_formatting'] = false;         $in['toolbar1'] = 'bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_fullscreen,pastetext,wp_adv';         $in['toolbar2'] = 'formatselect,underline,alignjustify,forecolor,removeformat,charmap,outdent,indent,undo,redo,wp_help ';              return $in;          } //end function       Currently, all spaces in editor (enter key) put a `<br />` tag in and line return (shift+enter keys) wraps a p tag around the element which is fine. However, I built these clients a bunch of custom shortcodes to allow them to add full pieces of a page at a time. So when they add a shortcode like so.... `[blockSection]` ...and want to close it while wrapping content like so... `My name is joe`   `Life is gravy`   `[/blockSection]`   it will add in too many `<br />` tags to the post like so... `[blockSection]<br />`   `My name is Joe<br />`   `Life is gravy<br />`   `[/blockSection]`   causing wierd spaces in my actual site design because of the un-acconuted for, newly added, extra `<p>` or `<br />` tags. **What I want:** I want the editor to change my functionality to the functionality of making a post within Stack Overflow. **Firstly** , I want the enter key to make no change in the code and allow them to have cleanly spaced lines within the editor. **Secondly** , I was a double space (two enter key hits) to produce a `<br />` on the Wordpress side. I really want my clients to feel at home and easily build content which wont happen if they are putting in one thing in the visual editor and seeing a different thing come out to the page.


title: Adding paging to get_posts()

text: I'm trying to add paging to the query below. However, I can't seem to get the paging to work. It shows previous/next links, however, they always show the same 2 posts. There are 8 posts in this query.               //$paged = get_query_var( 'page' );     wp_reset_query();          global $post;          $args = array('posts_per_page' => 2,'paged'=>1);     $posts = get_posts($args);


title: Single-page wordpress theme navigation

text: I'm trying to build single-page theme. I want user to navigate thru menu with anchors (for example `<a href="#About">About</a>`). I've extended Walker for wp_list_pages so it outputs anchors instead of permalinks. How to bite it now? I thought I will use `query_posts` for `'post_type' => 'page'` and just style those pages but is there more flexible way of doing this? Also this query displays all pages (all I want is just depth = 1) and I don't know how to order them same way as wp_list_pages does. Maybe there is some text to read about this kind of pages on the internet?


title: Bootstrap with Flexslider jQuery Issue

text: I'm building a Wordpress theme using Twitter Bootstrap. I have registered and enqueued the bootstrap .js file (including others) and everything works fine. This is my code:               wp_register_script( 'wp-flat-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true );      However, I have just integrated the Flexslider by WooThemes and I have also registered and enqueued its .js file. This is my code:               wp_register_script( 'flexslider-jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', '', true );      Whenever, I land on the page where the Flexslider appears the bootstrap .js's file stops working, which has its effect in that the menubar drop down stops working. Does anybody know how I can use the two scripts together without having this issue?


title: hardcoded wp pages/plugins problems

text: Ok so long story short, ive been handed a WP site that amongst a few minor changes, needs two specific plugins installed ASAP for the project to be complete. the menu amongst other things is hard coded. each page is also a separate page not feeding from single/page.php"...so if he has about us page etc...its a seperate "about-us.php" page. each menu item lead to their respective "---.php" pages and what the developer did is "hooked" and styled certain parts of WordPress into each separate page. (like sidebar for eg) so it provides half dynamism and half whatever he hard coded in there. the problem is that, the plugins i need to install,(jq lightbox,and image magnify zoom thingy) dont work. no matter what i do, its just a no go. When i click on the images, they just go to a blank page. now when i install them in a sample WP site i have and use to test things b4 i implement, it works as it should. Ive also thereafter tested on my own custom wp site from a side client and plugins also worked there. My boss knows im doing the research but this is a proj that was supposed to have BEEN done. ANy ideas as to how i can add/make work these plugins in this type of wp environment?? or is it not possible if not using the single/page.php? i CAN redo the whole site in my own manner but thatll take more time than i have so is there any further troubleshooting / fixes that i can do to get these plugins working? or is there any changes i can put on these seperate pages thatll allow me to use said plugins? the link to the page the developer designed/developed is http://maglovir.com/ Any tips/links/help in general i humbly appreciate. Thanks in advanced.


title: How to limit user to publish post per day and per role?

text: I would like to know is there any way/Plugin to limit the user published post (in a given time span) by his role? Like this: >   * Role A -> 1 post per day and 30 post total. >   * Role B -> 10 post per day and 100 post total. >   * Role C -> unlimited. > I know there are some plugin out there that have these features but they only able to control either limit post per day or limit number of posts on role basic, and they are not mutually inclusive on each other. > Note: This is to prevent the _real estate_ platform from being spamed. > (Editors note) Any ideas?


title: Adding class to the parent of current-post-ancestor / current-menu-parent / current-post-parent

text: Following situation: I have a drop down menu. At the moment we are located on a single post of the category "Produkt Design" ![enter image description here](http://i.stack.imgur.com/24v6v.png) Its class in the menu is `menu-item menu-item-type-taxonomy menu-item-object- category current-post-ancestor current-menu-parent current-post-parent menu- item-145` The parent to whom I want to apply a special styling, since it is the parent of the active menu entry, has the following classes `menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has- children menu-item-151` How can I make to get a special class to show in parent? See demo of the menu here ![enter image description here](http://i.stack.imgur.com/5i6p2.png)


title: pre_get_posts and the blog page

text: I am trying to set up my new theme in a propper way. I have created a custom home page for my new theme called "template-home.php" and then I created a "blog" page. I went to settings and changed my "Reading" settings to "A static page" and I set my front page to my home template and then I set my "Posts page" to "blog". I did not assign a custom template to that page. It is my understanding that the index.php file would be used to get those posts. I have been trying to use is_page() and is_category() to say that if it's the blog page, then get the blog posts. My hope was that when turning on the theme for the first time, all posts would be displayed on the front page but if I visited the blog page, the conditionals would kick in and get only the posts on the blog page. I thought I might be able to accomplish this taks by using this code               add_action( 'pre_get_posts', 'blog_query');          function blog_query( $query ){         if ( $query->is_page('blog') ) {         $query->set( 'category_name', 'blog' );        }         }      That isn't working. That gives me an error on the front page "Trying to get property of non object" I am just not sure which method to use to set up the blog page. Should I set a custom template for it and let the index page get all posts or try using the pre_get_posts? Your input is appreciated. Thank you.


title: How to change H1 color only for pages

text: This one should be easy for you guys. As the title says, I only want to change the color for pages and not posts. I've tried this and some variations of it but no luck               .page h1 {color:#ED3709 !important;}


title: add_action reference a class

text: Is it possible to reference a class instead of a function in 'add_action'? Can't seem to figure it out. Here is just a basic example of the function in question.               add_action( 'admin_init', 'MyClass' );     class MyClass {          function __construct() {               .. This is where stuff gets done ..          }     }      So yeah, that doesn't work. I've also tried:               $var = new MyClass();     add_action( 'admin_init', array( &$var ) );      And:               $var = new MyClass();     add_action( 'admin_init', array( &$var, '__construct' ) );      And also:               add_action( 'admin_init', 'MyClass::__construct' );      Is there anyway I can do this without having to create a separate function that loads the class? I'd like to be able to just run the classes constructor through the add_action. That's all that needs to be loaded to get the ball rolling.


title: Add "Email Image" button with Hyperlink for individual images

text: I use NextGen Gallery in combination with "Share My Gallery" and "prettyphoto Media" plugins to create and display image galleries that allow visitors to share individual images. I would like to add an email button within the prettyphoto Media plugin that allows viewers to email themselves an individual image that is also hyperlinked back to the main gallery. Any help would be appreciated Here is a link to a sample gallery: http://andrewvangundy.com/index.php/amex- sandbox/#prettyPhoto


title: display some fields in custom post backend

text: I am using the following code for the custom post.But i want three fields i.e Location,Persons ,Client to permanently appear in the backend of the custom post rather than having to create and select the custom field our self. I have no idea how to do it. So please help me out.               function create_post_type() {         register_post_type( 'events',             array(                 'labels' => array(                                 'name' => __( 'Events' ),                                 'singular_name' => __( 'Event' ),                                 'add_new' => __( 'Add New' ),                                 'add_new_item' => __( 'Add New Event' ),                                 'edit' => __( 'Edit' ),                                 'edit_item' => __( 'Edit Event' ),                                 'new_item' => __( 'New Event' ),                                 'view' => __( 'View Event' ),                                 'view_item' => __( 'View Event' ),                                 'search_items' => __( 'Search Event' ),                                 'not_found' => __( 'No Event found' ),                                 'not_found_in_trash' => __( 'No Event found in Trash' ),                                      ),                 'public' => true,                 'has_archive' => true,                 'rewrite' => array('slug' => 'events'),                 'show_ui' => true,                 'publicly_queryable' => true,                 'exclude_from_search' => false,                 'taxonomies' => array( 'Event type'),                 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', 'revisions' ),                  )         );     }


title: How do I get my nav menu to show sub pages?

text: http://webdesignsalemoregon.com/westernmennoniteschool/ is my website. I've got the top menu which is the one that was in the theme when I started to customize it. It's got a test drop down that works just fine. I included a secondary menu under the slider with this code               <div id="secondaryMenu">         <?php             $menuID = 'bottom-nav';             $footerNav = '';                  if (function_exists('wp_nav_menu')) $footerNav = wp_nav_menu( array( 'theme_location' => 'footer-menu', 'container' => '', 'fallback_cb' => '', 'menu_id' => $menuID, 'menu_class' => 'bottom-nav', 'echo' => false, 'depth' => '2' ) );             if ($footerNav == '') show_page_menu($menuID);             else echo($footerNav);         ?>     </div>      It works just fine, except for the fact it does NOT show drop downs? I've got 3 pages underneath "Admissions" the furthest left item, and they don't show up?


title: wp_get_archives() display months even if there is no posts

text: Hay, the example on the wp_get_archives documentation page shows how to show a list of all the posts, by months. However if there is no posts for a month, the month doesnt get displayed. So an example list could look like this               Janauary (5)     March (1)     April (1)     ...      Is there a way to force the list to display a month, even if no posts exist? Thanks


title: WordPress package configuration in Ubuntu Server?

text:
So I wanted to play with some Linux-only PHP performance tools and installed Ubuntu Server 10.10 in VirtualBox (for the record I have little clue about Linux, never used it extensively). Turned out Ubuntu (Debian) has WordPress package that does some things differently then I am used to. I was especially puzzled with this instead of usual `wp-config.php`:               $debian_server = preg_replace('/:.*/', "", $_SERVER['HTTP_HOST']);     $debian_server = preg_replace("/[^a-zA-Z0-9.\-]/", "", $debian_server);     $debian_file = '/etc/wordpress/config-'.strtolower($debian_server).'.php';          if (!file_exists($debian_file)) {         header("HTTP/1.0 404 Not Found");     echo "$debian_file could not be found. The file is either not readable by this process or does not exist.
         Please check if $debian_file exists and contains the right password/username.";         exit(1);     }          require_once($debian_file);          define('ABSPATH', '/usr/share/wordpress/');     define('WP_CORE_UPDATE', false);     define('WP_ALLOW_MULTISITE', true);          require_once(ABSPATH.'wp-settings.php');      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?


title: Socialite WP plugin, unable to obtain API keys from FB

text: 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. 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) 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?


title: Generating a Rewrite Rule for sSecific Post-Requests from a Submitted Form?

text: I have a form ( method post ) which makes it possible to filter my posts by specific criterias e.g. "Most Recent", "This week", "Last week", ... 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 "dynamic" URLS like http://myurl.com/most-recent   http://myurl.com/last-week   http://myurl.com/category-1/most-recent   http://myurl.com/category-1/last-week   The rewrite rule which lookes for the words "most-recent", "last-week", ... 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, ... I hope you guys can understand what i mean!


title: orderby in query_posts

text: I have the following line to change my wp query slightly. The posts are by this ordered by the value in the custom field "wpfp_favorites". The value is allways an integer. Posts with value 0-9 is sorted correctly, but when a post has value 10 (or more i guess) its not listed above posts with 9.               query_posts('meta_key=wpfp_favorites&orderby=meta_value');      What is wrong? You can see the problem in "action" here: http://hverdagskupp.no/


title: Manipulate list of themes in wp-admin

text: I'm running a multisite network with 100+ themes installed and activated. Is there a way to manipulate the list of available themes in wp-admin so that certain themes appear in the list first? (a kind of "Featured" or "recommended") After the first 9 or so alphabetical as default would be fine. Obviously Googling the words "wordpress" and "themes" has been pretty fruitless in this case.


title: How/where is the global variable $wp_registered_widgets filled?

text: I have a problem of widgets not showing up, trying to investigate why $wp_registered_widgets is empty. Can somebody tell me where it gets filled from the database? How can I find out why the default widgets are not set.


title: How would I create a plugin for my shortcodes?

text: 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?


title: Change identical page for every site in multisite

text: I have an identical page on all my sites in a multisite install. I need to add a bit of text to the bottom of only that page. Is there a quick(ish) way of doing this other than going through each site in the install? The text is identical and in most cases the link is the same, though when I say _same_ I mean I'm using postname in permanent links, the IDs probably differ I would think. I would really rather not go through each site as there are a lot of sites in the install!


title: Change wording of admin menu item?

text: I'm using the plugin Jigoshop and I'd like to change the wording of the admin menu to something other than "Products": ![enter image description here](http://i.stack.imgur.com/RFxEp.png) How can I do this? What files need editing?


title: Using Wordpress header in a moodle site

text: Hello I am trying to use the wordpress header inside Moodle instead of using the menu in the theme we are using. I have tried adding it using this php code below in the header.php file of the moodle theme but that didn't work and caused the site only to load the background, I also tried adding it in the "additional HTML" area in moodle but that didn't make any difference at all and the page loads as normal. Does anyone know how this can be done as it will be really useful to make the site seamless. Any help is greatly appreciated, thank you.               <?php require('/XXX/public_html/wp-blog-header.php'); ?>     <?php require('/XXX/wp-content/themes/ourtheme/wp-blog-header.php'); ?>


title: Front-end form submission not creating post

text:
I'm trying to use a front end form to create a post. I've been trying for a while now but I the post is not created. I'm using the code below, i'm not sure if i've forgot something.               <?php Starkers_Utilities::get_template_parts( array( 'parts/shared/html-header','parts/shared/header') ); ?>          <?php      function ty_front_end_form() {     ?>         <?php              if($_POST){             ty_save_post_data();         }          }          function ty_save_post_data() {              if ( empty($_POST) || !wp_verify_nonce($_POST['name_of_nonce_field'],'name_of_my_action') )         {            print 'Sorry, your nonce did not verify.';            exit;              }else{                   // Do some minor form validation to make sure there is content             if (isset ($_POST['title'])) {                 $title =  $_POST['title'];             } else {                 echo 'Please enter a title';                 exit;             }             if (isset ($_POST['description'])) {                 $description = $_POST['description'];             } else {                 echo 'Please enter the content';                 exit;             }                  if(isset($_POST['post_tags'])){             $tags = $_POST['post_tags'];             }else{             $tags = "";             }                  // Add the content of the form to $post as an array             $post = array(                 'post_title' => wp_strip_all_tags( $title ),                 'post_content' => $description,                 'post_category' => $_POST['cat'],                   'tags_input' => $tags,                 'post_status' => 'publish',                          'post_type' => $_POST['post-type']              );             wp_insert_post($post);                   $location = home_url();                   echo "<meta http-equiv='refresh' content='0;url=$location' />"; exit;         } // end IF          }     ?>
          <form id="custom-post-type" name="custom-post-type" method="post" action="">
Post Title
              <input type="text" id="title" value="" tabindex="1" size="20" name="title" />
<input type="submit" value="Publish" tabindex="6" id="submit" name="submit" />
              <?php wp_nonce_field( 'name_of_my_action','name_of_nonce_field' ); ?>          </form>
          <?php Starkers_Utilities::get_template_parts( array( 'parts/shared/footer','parts/shared/html-footer') ); ?>


title: Dynamically replicate custom metabox in custom post type

text: I'm building a custom post type in Wordpress which will be used to author and display BuzzFeed style quizzes on a clients blog. Within the custom post type there are custom meta-boxes which represent each question and selections, and another representing the potential ultimate results. So the first meta-box consists of a number input type to assign an ID, a textfield to enter the question, and another field to enter an image. To the author this would represent the first question in their quiz. If they have more than one question to enter, they would need to select the button to add another set of fields. What I'm not sure how to do is how to generate that and ensure that any added fields get saved. I'd rather not resort to a plugin or a drop in library as it's important that I learn how to do it as much as it is that I resolve it.


title: csv format change in wocommerece

text: i have made my own custom code to download the csv of order it is quite working good but i need to give one space in after each coloum i mean to say if one value is coming in A than second value should come to colum C not in B in execel sheet.. can anyone help me ? my code is below:                function NYCSV_GENERATE($getTable){     ob_clean();     global $wpdb;     $field='';     $getField ='';          if($getTable){         $result = $wpdb->get_results("SELECT * FROM $getTable");         $requestedTable = mysql_query("SELECT * FROM ".$getTable);         $fieldsCount = mysql_num_fields($requestedTable);              for($i=0; $i<$fieldsCount; $i++){             $field = mysql_fetch_field($requestedTable);             $field = (object) $field;                      $getField .= $field->name.',';         }              $sub = substr_replace($getField, '', -1);         $fields = $sub; # GET FIELDS NAME         $each_field = explode(',', $sub);                $csv_file_name = $getTable.'_'.date('Ymd_His').'.csv'; # CSV FILE NAME WILL BE table_name_yyyymmdd_hhmmss.csv              # GET FIELDS VALUES WITH LAST COMMA EXCLUDED         foreach($result as $row){             for($j = 0; $j < $fieldsCount; $j++){                 if($j == 0) $fields .= "\n"; # FORCE NEW LINE IF LOOP COMPLETE                 $value = str_replace(array("\n", "\n\r", "\r\n", "\r"), "\t", $row->$each_field[$j]); # REPLACE NEW LINE WITH TAB                 $value = str_getcsv ( $value , ",", "\"" , "\\"); # SEQUENCING DATA IN CSV FORMAT, REQUIRED PHP >= 5.3.0                 $fields .= $value[0].','; # SEPARATING FIELDS WITH COMMA             }                        $fields = substr_replace($fields, '', -1); # REMOVE EXTRA SPACE AT STRING END         }              header("Content-type: text/x-csv"); # DECLARING FILE TYPE         header("Content-Transfer-Encoding: binary");         header("Content-Disposition: attachment; filename=".$csv_file_name); # EXPORT GENERATED CSV FILE         header("Pragma: no-cache");         header("Expires: 0");              return $fields;       }     }


title: Import External XML

text: I don't know where to start with this one. I would like to create custom post type which will list properties on clients website. I would like those properties being feed from another website/software. So other website/software will be sending XML file to my Wordpress site and I would like to receive that file and convert it to my custom posts. Could anyone help me to get my head around this task, i.e. where to start? Do I need to create custom table in my database? How do I capture that XML file? Any info would be much appreciated. Thanks


title: New custom theme option (text input) giving index error

text:
I am using the theme-options.php file from ThemeShaper: http://themeshaper.com/2010/06/03/sample-theme-options/ 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):
 Notice:  Undefined index:  cpt_sm_dribbble_handle in /[THEME_DIRECTORY]/theme-options.php on line 359
      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. 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. 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):               add_action('admin_init', 'cpt_options_init');     add_action('admin_menu', 'theme_options_add_page');          function cpt_options_init() {         register_setting('cpt_options', 'cpt_theme_options', 'theme_options_validate');     }          function theme_options_add_page() {         add_theme_page('Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'theme_options_do_page');     }          function theme_options_do_page() {         global $sm_select_options;              if (!isset($_REQUEST['settings-updated']))             $_REQUEST['settings-updated'] = false;     ?>              <form method="post" action="options.php">             <?php settings_fields('cpt_options'); ?>             <?php $options = get_option('cpt_theme_options'); ?>
                 Dribbble	                                      Dribbble Username                     <input id="cpt_theme_options[cpt_sm_dribbble_handle]" class="regular-text" type="text" name="cpt_theme_options[cpt_sm_dribbble_handle]" value="<?php esc_attr_e($options['cpt_sm_dribbble_handle']); ?>" /> // THIS IS THE LINE THAT IS THROWING THE ERROR (line 359)
              </form>          <?php     }          function theme_options_validate($input) {         global $sm_select_options;              // Say our text option must be safe text with no HTML tags         $input['cpt_sm_dribbble_feed'] = wp_filter_nohtml_kses($input['cpt_sm_dribbble_feed']);              return $input;     }      Any ideas on what I'm doing wrong? Thanks for your time.


title: Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor

text: We're using the Feed Wordpress (Syndication) plugin to ingest external feeds resulting in posts published in WordPress. 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. 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. 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?


title: Thumbnail Image to go in the post aswell

text: 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. So it automatically puts the image in the post (top left corner for example) Thank you


title: Non-Linear Questionnaires in Wordpress

text: I want to make the following happen in Wordpress   1. People answer questions in paginated or single page form.   2. Each next set of options is dependent on the option the user selects preiviously   3. At the end, the user is directed to a page which is a common ending for all questionnaire trees.   4. All this questionnaire options can be viewed/exported **Question:** 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?


title: Displaying Tags for the Page I'm On?

text: I currently have `<?php $comma = array( 'separator'=> ", " ); wp_tag_cloud($comma); ?>` and I thought this was solved, until going to other posts and seeing the same exact tags.. so I'm guessing this is displaying every tag possible. How do I only display the tags related to each post?


title: Get list of registered or enqued styles? looking for filters or actions

text: Where can I get the list of styles about to be printed? What i want is to either filter the list, doing what i want with each, then return empty list. Or do an action that recieves the list, then i can remove_action the print_styles. Something like that, anyway. I'm creating a css minifier concatenizer.


title: Make a table out of meta box

text:
I want to display the information for my custom metabox as a table on my posts. First question is, how do I make a table out of the information, and secondly, how do I call the metabox? Also, can I have the table disappear if nothing is filled in?               $prefix = 'anime_';          $anime_box = array(         'id' => 'anime-meta-box',         'title' => 'Anime Details',         'page' => 'post',         'context' => 'normal',         'priority' => 'high',         'fields' => array(             array(                 'name' => 'Name',                 'desc' => 'Add the name of the Anime in either English or Japanese(Romanji).',                 'id' => $prefix . 'anime_name',                 'type' => 'text',                 'std' => ''             ),             array(                 'name' => 'Genre',                 'desc' => 'Is it a thriller, action/adventure, etc...',                 'id' => $prefix . 'anime_genre',                 'type' => 'text',                 'std' => ''             ),             array(                 'name' => 'Directed by',                 'desc' => 'Name of director(s).',                 'id' => $prefix . 'anime_director',                 'type' => 'text',                 'std' => ''             ),             array(                 'name' => 'Music by',                 'desc' => 'Name of composer(s)',                 'id' => $prefix . 'anime_music',                 'type' => 'text',                 'std' => ''             ),             array(                 'name' => 'Studio',                 'desc' => 'Studio which owns the anime.',                 'id' => $prefix . 'anime_studio',                 'type' => 'text',                 'std' => ''             ),              array(                 'name' => 'Licensed by',                 'desc' => 'Name of both American and Japanese license holders.',                 'id' => $prefix . 'anime_license',                 'type' => 'text',                 'std' => ''             ),             array(                 'name' => 'Network(s)',                 'desc' => 'Networks which air the show in both Japan and the United States.',                 'id' => $prefix . 'anime_network',                 'type' => 'text',                 'std' => ''             ),              array(                 'name' => 'Original run',                 'desc' => 'Date of when the anime first aired and when it stopped.',                 'id' => $prefix . 'anime_run',                 'type' => 'text',                 'std' => ''             ),             array(                 'name' => 'Episodes',                 'desc' => 'Number of episodes.',                 'id' => $prefix . 'anime_episodes',                 'type' => 'text',                 'std' => ''             ),              )     );          add_action('admin_menu', 'anime_add_box');          // Add meta box     function anime_add_box() {         global $anime_box;              add_meta_box($anime_box['id'], $anime_box['title'], 'anime_show_box', $anime_box['page'], $anime_box['context'], $anime_box['priority']);     }          // Callback function to show fields in meta box     function anime_show_box() {         global $anime_box, $post;              // Use nonce for verification         echo '<input type="hidden" name="anime_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';              echo '
';              foreach ($anime_box['fields'] as $field) {             // get current post meta data             $meta = get_post_meta($post->ID, $field['id'], true);                  echo '
',                     '', $field['name'], ':	',                     '';             switch ($field['type']) {                 case 'text':                     echo '<input type="text" name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : $field['std'], '" size="30" style="width:97%" />',                         '
', $field['desc'],'';                     break;                  }             echo    '',                 '
';         }              echo '
';     }          add_action('save_post', 'anime_save_data');          // Save data from meta box     function anime_save_data($post_id) {         global $anime_box;              // verify nonce         if (!wp_verify_nonce($_POST['anime_meta_box_nonce'], basename(__FILE__))) {             return $post_id;         }              // check autosave         if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {             return $post_id;         }              // check permissions         if ('page' == $_POST['post_type']) {             if (!current_user_can('edit_page', $post_id)) {                 return $post_id;             }         } elseif (!current_user_can('edit_post', $post_id)) {             return $post_id;         }              foreach ($anime_box['fields'] as $field) {             $old = get_post_meta($post_id, $field['id'], true);             $new = $_POST[$field['id']];                  if ($new && $new != $old) {                 update_post_meta($post_id, $field['id'], $new);             } elseif ('' == $new && $old) {                 delete_post_meta($post_id, $field['id'], $old);             }         }     }


title: Second tier sidebar navigation

text: I'm trying to create a second level navigation in WordPress. I've found lots of examples, but none of them seem to do exactly what I want. This code below has me almost there, but I want an active class or better yet a way to only show the sub navigation if I'm on it. It would be great it WordPress had a depth_start option along with depth. Example:               link1     link2 (active class)       link2-1       link2-2       link2-3     link3     link4      Code so far:               <?php          $parent = array_reverse(get_post_ancestors($post->ID));     $first_parent = get_page($parent[0]);          $args = array(         'depth'        => 0,         'child_of'     => $first_parent->ID,         'title_li'     => __($first_parent->post_title),         'sort_column'  => 'menu_order',     ); ?>          <nav class="sidebar">         <ul>             <?php wp_list_pages( $args ); ?>          </ul>     </nav>


title: Commas in Tag Cloud

text: Using `<?php wp_tag_cloud(''); ?>` to display tags on my website, how do I separate each tag with a comma but also remove the comma from the last tag?