title: How can I load jquery library into my dashboard widget?

text:
I'm attempting to use wp_enqueue_script('jquery') to load the builtin WP jquery library but my jquery functions aren't working when I do this. Only when I hardcode a reference to the script do my functions work... Example that works... (this is inside my functions.php file, which is adding a dashboard widget)...               /* Dashboard Widget */     if(is_admin())     {     function my_dashboard_widget_function()      {          $rss = fetch_feed( "http://mysite/my.rss" );         if ( is_wp_error($rss) )          {             if ( is_admin() || current_user_can('manage_options') )              {                 echo '
';                 printf(__('RSS Error: %s'), $rss->get_error_message());                 echo '
';             }          return;         }              if ( !$rss->get_item_quantity() )          {             echo '
This feed is currently offline
';             $rss->__destruct();             unset($rss);             return;         }     echo ""          echo "";      Example that does not work...               /* Dashboard Widget */     if(is_admin())     {     function my_dashboard_widget_function()      {          $rss = fetch_feed( "http://mysite/my.rss" );         if ( is_wp_error($rss) )          {             if ( is_admin() || current_user_can('manage_options') )              {                 echo '
';                 printf(__('RSS Error: %s'), $rss->get_error_message());                 echo '
';             }          return;         }              if ( !$rss->get_item_quantity() )          {             echo '
This feed is currently offline
';             $rss->__destruct();             unset($rss);             return;         }     wp_enqueue_script('jquery');     echo "";


title: What is the purpose of an extra file for translation?

text: What code is required to put in `functions.php` in order to make the theme translation ready? The TwentyEleven theme has only following line:               load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' );      But in many tutorials they have mentioned to add following:               load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' );     $locale = get_locale();         $locale_file = TEMPLATEPATH . "/languages/$locale.php";         if ( is_readable( $locale_file ) )             require_once( $locale_file );      Is the second part required to add in the `functions.php` file to make it translation ready? If it is, why the TwentyEleven theme does not have it?


title: WP_Ajax Hook doesn't execute this PHP code

text: add_action('wp_ajax_nopriv_updating_heat_value','updating_heat_value');     add_action('wp_ajax_updating_heat_value','updating_heat_value');     add_action('wp_ajax_update_reading_history','update_reading_history');          function update_reading_history() {     global $post;     if(is_normal_post()) {             $postiddx2 = get_the_ID();             $thepost = get_post($postiddx2);             if(!(wp_is_post_revision($thepost)))             {             $userid1 = get_current_user_id();             $loggedreadinghistory = get_user_meta($userid1, 'readinghistory', true);             if($loggedreadinghistory == '') {                 $readinghistory = $postiddx2;                 update_user_meta($userid1, 'readinghistory', $readinghistory);             }             else             {                 $readinghistory = $loggedreadinghistory;                 $readinghistory = $readinghistory.','.$postiddx2;                 update_user_meta($userid1, 'readinghistory', $readinghistory);             }             }     }     exit();     }          function updating_heat_value()     {     global $post;     if(is_single())     {         $postiddx = get_the_ID();         $timenow = time();         $heatvaluedate = get_post_meta($postiddx, 'heatvaluedate');         if((get_post_meta($postiddx, 'heatvalue') == '') || $heatvaluedate == '')         {             update_post_heat_value($postiddx);         }         elseif(($timenow - $heatvaluedate) >= 600)         {             update_post_heat_value($postiddx);         }     }     exit();     }      I would like to add this PHP code to the wp_ajax hook, but I don't know how these functions don't get executed. What could be the problem? Is this the optimal way to do something like this?


title: How to display magic field's custom write panel in wordpress theme?

text: So here is the thing. I'm creating a site. A user can register in my site and post articles. The thing is I don't want separate admin area to post articles. I want to integrate everything in my theme. So the user don't need to go to wp-admin to create posts. I'm using magic fields plugin. I created a custom write panel. Now my only problem is i don't know what shortcode or hook i should use to display that custom write panel in my theme. I mean i want the whole write panel in my theme. Here is a sample snapshot of custom write panel. ![enter image description here](http://i.stack.imgur.com/ftSqQ.jpg) I want to display the whole custom panel in my frontend. So logged in users can submit articles from that page. I hope you guys get what i mean. Thanks


title: Extracting a variable from a permalink

text: I used the "Edit Author Slug" plugin to change the author base to /newbase . In the functions.php file, I added a new node to the toolbar (View Profile) that when clicked points to ../newbase/johndoe (johndoe is the author slug) I'm using the author.php page as the /profile and will show some user information. If the user is logged in and clicks in the "View Profile" link, I have no problem. Inside author.php I can use $current_user->user_login and get all the information. My problem is for those not logged in or, let say I have a page displaying users and I click on their link which looks like .../profile/mrsmith - I cannot use $current_user . I would like to somehow pass a variable (maybe query_vars, I don't know) to author.php (/profile) or to extract the "mrsmith" from the URL and the inside author.php I can look up that user in the database and show the data I want. I appreciate your help on this. Maybe is very easy but I have struggle for 2 days and have tried multiple things and can't figure it out.


title: Meta-Boxes for CustomPostType cause PHP Errors and Notices in "Add New" view

text: I have a custom-post-type named `wr_events`. I have quite a lot of meta-boxes in this post-type. The post-type and the meta-boxes itself work just fine. Only thing: No matter at what post-type I create a "New post" I get quite a lot of php errors and notices …               Notice: Undefined index: _wr_event_speaker in /Users/my/htdocs/wr/wp-content/themes/wr/functions.php on line 246          Notice: Undefined index: _wr_event_date in /Users/my/htdocs/wr/wp-content/themes/wr/functions.php on line 248          Notice: Trying to get property of non-object in /Users/my/htdocs/wr/wp-content/themes/wr/functions.php on line 249          Notice: Trying to get property of non-object in /Users/my/htdocs/wr/wp-content/themes/wr/functions.php on line 250          Notice: Undefined index: _wr_event_time in /Users/my/htdocs/wr/wp-content/themes/wr/functions.php on line 250          Notice: Trying to get property of non-object in /Users/my/htdocs/wr/wp-content/themes/wr/functions.php on line 251          Notice: Undefined index: _wr_event_review in /Users/my/htdocs/wr/wp-content/themes/wr/functions.php on line 251      So even though this meta-boxes are just assigned to my "events" post-type the errors above also come up when I create a normal new post. So again, if I click on "Add New" this messages come up. They also appear if I goto "Add New" in my custom-post-type. Weird is, that the errors don't come up if I **edit** a post or a custom-post. Any ideas what could cause that? **update:** Well I use a class for the custom metaboxes because my requirements are quite unusual. https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for- WordPress               /**      * Initialize the post-meta class      */          add_action( 'init', 'be_initialize_cmb_meta_boxes', 9999 );     function be_initialize_cmb_meta_boxes() {         if ( !class_exists( 'cmb_Meta_Box' ) ) {             require_once( 'lib/metabox/init.php' );         }     }          add_filter( 'cmb_meta_boxes', 'cmb_sample_metaboxes' );          function cmb_sample_metaboxes( array $meta_boxes ) {              $prefix = '_wr_';              $meta_boxes[] = array(             'id'         => 'event_review',             'title'      => 'Review',             'pages'      => array( 'wr_event'),             'context'    => 'normal',             'priority' => 'low',             'fields'     => array(                 array(                     'name'    => 'Review',                     'id'      => $prefix . 'event_review',                     'type'    => 'wysiwyg',                     'options' => array( 'textarea_rows' => 5, ),                 )             ),         );              return $meta_boxes;     }      So, again: This works like a charm and the notices actually shouldn't bother me because everything is working fine. However I was just wondering why this notices appear on every "Add New" page. **update:** The `update_post_meta()` functions throw the error.               add_action('save_post', 'save_details');          function save_details(){         global $post;         update_post_meta($post->ID, "event_review", $_POST["_wr_event_review"]);     }


title: How to change the default logout link on WordPress Admin

text: I want to use other link for logout because i have /wp-admin/* protected with htpassword. Is there a way to do this? Something like create a custom page like site.com/logout then use it as my new logout link? Thanks!


title: Where to hook to bypass instantiating WP_Query?

text: I'm a bit stalled in a plugin creation, as I do not find a way to elegantly hook things up. A strip down version of my problem is the following:   1. Boot Wordpress completely (core and plugins)    2. Detect certain URL patterns like mydomain.com/video/video_id   3. In this case call a function is_404(video_id) in my plugin     1. If true, then I want to jump directly to loading the usual 404 template      2. If false, then I call a template file template_directory/my_video.php?v=video_id (I won't need the_loop) I've found the rewrite hooks, but I don't see how to make them work since I don't need to instantiate WP_Query. Any ideas?


title: Include home page template in specific category template

text: I have a specific category who's page I'd like to look like the home page of my site, with all the nice sliding featured stories, etc. If I create a file `category-slug.php`, can I do some sort of include of the index template? If it helps, I'm using wootheme's FlashNews theme.


title: How Can I Edit the Registration Code?

text: I would like to add a group of two radio buttons to Wordpress's registration page (yes and no), where if yes is selected the value in the email field will be added to an aweber mailing list. Would this be best achieved by editing the registration code itself? If so, what .php file could I find the relevant code in? Or is there a plugin that could do this more easily?


title: Translation with wordpress what does the process involve?

text: What's the process involved with translating content into the language of your own? Or multiple languages? I'm looking to create a website that requires various different language translations.


title: Pre-populating the Page/Post Content Editor with HTML Snippets?

text: I've built a simple sales page theme and would like to enhance it a bit by allowing the input of default content (including headers, bullet points, testimonial blockquotes and the ubiquitous "add to cart" button). What are the options for adding html snippets to content pages and/or posts? Ideally, when I click "Add New" from the Post or Page menu, the content would already be pre-populated with the sales page default content. Or perhaps even better, I could add a menu below the "Add New" link like "Add New Salespage" and by clicking that, it would default the sales page content. I'd like to have a page in my theme folder called salespage.html (or salespage.txt, or salespage.php, whichever is easier to work with) and this would be the content that is used to prepopulate the editor. Any help much appreciated. UPDATE: Thanks to Chris_O's answer below, I was able to find the solution. I've augmented Chris suggested solution to load the content from an external file....               if (get_option("cb2_theme") == "salespage")     {     //added to support salespage creation     add_filter( 'default_content', 'my_editor_content' );          function my_editor_content( $content ) {              if(file_exists(ABSPATH.'wp-content/themes/clickbump_wp3/styles/salespage/default-content.html')){$content = file_get_contents(ABSPATH.'wp-content/themes/mytheme/styles/salespage/default-content.html');}else{$content = "Enter your salespage content here. h1-h3 tags, blockquotes etc";}              //$content = "This is some custom content I'm adding to the post editor because I hate re-typing it.";              return $content;     }     }


title: How to display Changing post link for 24 hours in x category

text: **Here is an example** Cat 1 has 6 post: ( post 1 , post 2 , post 3, post 4 etc.. ) Cat 2 has 6 post: ( post 1 , post 2 , post 3, post 4 etc.. ) **i want to display random post like this:** Today's CAT 1 Random post : Post 2 Today's CAT 2 Random Post : Post 5 but the posts has to change per 24 hours. Is it possible. Thanks ( Sorry about my bad Eng )


title: How can I run AJAX on a button click event?

text: **Update:** I managed to get the AJAX working, but not in the click event. I updated the question to match this. I'm trying some code I found on the page: 'AJAX in Plugins'. However I can't get it to work, and I Don't really know where to start looking. It works when I remove the click function and just run the code on pageload. I have a Javascript file that looks ike this:               jQuery(document).ready(function(){         jQuery("#createremotesafe").click(function(){             alert ('test');             var data = {                 action: 'my_action',                 whatever: 1234             };                  // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php                  jQuery.post(ajaxurl, data, function(response) {                 alert('Got this from the server: ' + response);             });         });         });      and somewhere in my PHP script that generates the button that should execute the Javascript (i.e. the admin page), and also the rest of the page:               add_action('wp_ajax_my_action', 'my_action_callback');     echo 'test2';     function my_action_callback() {       global $wpdb; // this is how you get access to the database       $whatever = $_POST['whatever'];       $whatever += 10;       echo $whatever;       die(); // this is required to return a proper result     }      I get both the `Alert ('test')` and the `echo 'test2'`, but not the response alert. There are no Javascript errors or anything. My code is definitely running, since I can see both 'test's, but why isn't AJAX getting any response? Does my php function disappear after page load? Maybe I can't/shouldn't use the built in wp AJAX functions? It also doesn't show an empty alert box, just nothing happens.


title: Change WP-Login or WP-Admin

text: Can I change the name of the wp-login or wp-admin file so that I can go to a different filename in order to login. I am trying to prevent hackers from finding my login and wp-login has become a very obvious option.


title: Add a jQuery function to admin pages

text: I need to add a bit of document ready jQuery to post/page editors in admin. I'm hacking an old plugin that adds a text box to the editor page and handles inserting that text in a template file, but the text input is only html; this document ready function adds the class of mceEditor to the text box. This function works when I manually include it in admin-header.php, but I can't do that, of course. I don't think I need to enqueue it, as it is not a library. Or do I? And, if applicable: what are the pros/cons of different ways to add it? So how do I hook this or otherwise load it into the post/page editors in admin? It needs to go into the plugin file, not functions.php in the theme.


title: Get page IDs from nav items

text: I am trying to get all the IDs in my navigation and convert it to a string so that I can use it with `wp_query` to get the pages that are only listed in the nav. The code to get the IDs:               $menu_name = 'primary';          if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] )) {         $menu = wp_get_nav_menu_object( $locations[ $menu_name ] );         $menu_items = wp_get_nav_menu_items($menu->term_id);     }          foreach ( $menu_items as $menu_item ) {         $numbers[] = $menu_item->ID;     }          $number = implode(',',$numbers);      But it is returning the wrong numbers. When I go to the admin area and hover my mouse over the pages, the number that shows up in the address bar on the bottom of the screen doesn't match. What am I doing wrong?


title: Background image in posts

text:
I'm trying to get the featured image to display in the background-image of each standard post-format post. So I'm successful in grabbing the image and was able to make it 100% of the width and height within the container. However, it displays as an image and pushes the text below. How would I get the text in the post to display on top of it? Here is my code. content.php
         <?php         $standard_img = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID));         if( $standard_img ) {         ?>         <img src="<?php echo $standard_img[0]; ?>" width="<?php echo $standard_img[1]; ?>" height="<?php echo $standard_img[2]; ?>">         <?php } ?>
                    <article <?php post_class(); ?>>
         <?php the_excerpt(); ?>

<a href="<?php the_permalink(); ?>"><?php the_title(); ?>
             and here is my styling for the box so far.               .m-feat-img img {       width: 100%;       height: 100%;     }      Any help in the right direction is appreciated!!! Thanks.


title: About Hooks and Filters

text: Well, am having a very hard time understanding the difference between Actions and Filters. I do use actions in my code, but am a rookie and I don't know even a slightest bit of Filters. I have been to codex, and various sites by NickTheGeek, BillErickson, Gary Jones etc, but no vein. If you can tell me in simple words, with example that what basically is and difference between actions, filters and hooks. Thanks a ton.


title: Query for recent images across multiple posts

text: I'm a bit fresh to wordpress theme development (and PHP in general), and I'm curious if there is a way to query XX number of recent images, likely spanning across multiple posts. Basically I want to create a widget that shows a 3x3 set of the most recent images used in posts. Any thoughts on how one would accomplish this?


title: Dynamic Custom Permalinks

text: I have a scenario in which the intention is to make custom permalink that can be changed dynamically, for example:   * If a country information is showing up then the URL should be `http://example.com/country-information`   * If the city information of that specific country is showing up then the URL should be like `http://example.com/country/city-information`.  How can I achieve that?


title: Using add_image_size in functions.php to get original uploaded file

text: It is possible to use add_image_size in functions.php to get the original uploaded file size. Because when I uploaded the images to my posts I cropped them in order to have 1x1 ratio for all my image sizes and I remember using the All images option. So now when I use full or large I always end up with squared images. But I can see that the original uploaded files with the good proportions are still there in the uploads folder and I would like to use retrieve them if possible, somehow. I use the following code in functions.php:               <?php     function my_attachment_all_images($postid=0, $size='full', $attributes='') {         if ($postid<1) $postid = get_the_ID();         if ($images = get_children(array(             'post_parent' => $postid,             'post_type' => 'attachment',             'numberposts' => -1,             'orderby' => 'menu_order',             'post_mime_type' => 'image',)))             foreach($images as $image) {                 $attachment=wp_get_attachment_image_src($image->ID, $size);                 ?><img src="<?php echo $attachment[0]; ?>" alt="" class="imarge" /><?php             }     }?>      But using 'full' for the size give me the cropped file not the original uploaded file. The output is: myImageFile-e1343105908459.jpg (cropped 1x1) instead of myImageFile.jpg (original 3x2) Many thanks for your time and help.


title: List all the tags from a custom post type

text: I'm looking for solution that will display all the tags that used on a custom post type.. I just want to list them all coz I'm going to add jquery code on each tag. :)


title: Taxonomy Templates

text: I don't quite understand how to link to my taxonomy templates. Do I need to make a page-tempalte and query my terms from there? I'm using the taxonomy hierarchy currently: **Taxonomy**               $labels = array(             'name'              => __( 'Product Categories' ),             'singular_name'     => __( 'Product Category' ),             'search_items'      => __( 'Search Product Categories' ),             'all_items'         => __( 'All Product Categories' ),             'parent_item'       => __( 'Parent Product Category' ),             'parent_item_colon' => __( 'Parent Product Category:' ),             'edit_item'         => __( 'Edit Product Category' ),              'update_item'       => __( 'Update Product Category' ),             'add_new_item'      => __( 'Add New Product Category' ),             'new_item_name'     => __( 'New Product Category' ),             'menu_name'         => __( 'Product Categories' ),         );          $args = array(             'labels'            => $labels,             'show_in_nav_menus' =>  false,             'hierarchical'      => true,             'rewrite'           =>  array('slug' => '/products', 'with_front' => false),         );         register_taxonomy( 'protax', 'product', $args );      Then I have a taxonomy template : `taxonomy-protax.php` which I should be able to get to via `www.mywebsite.com/products` but it keeps leading to 404. Taxonomy template always seem to give me the most trouble... How do I view my `taxonomy-protax.php` page?


title: query user display_name failed in a custom mysql query foreach

text: I met some trouble. I tried to get user display_name in a custom mysql query foreach, but it failed. I have tried three method. `new WP_User`, `get_user_by` and `get_userdata`. but they only can get back the result `$user->display_name` which is ID=1 in table `wp_users`(admin). failed get any `$user->display_name` which ID=2(3,4...) in table `wp_users`. What should I do to solve this question? many thanks.               $results = mysql_query("SELECT * FROM custom_table");// query connect from a custom database, not in database wp.     while($row = mysql_fetch_array($results)) {     global $wpdb;     $user = new WP_User($row['user_id']);     //$user = get_user_by('id',$row['user_id']);                     //$user = get_userdata($row['user_id']);     var_dump($user);     }      **edit** Here is my full code. same code, If `SELECT * FROM test_table where id = 1` I could get the user display name `admin`, but if I try `SELECT * FROM test_table where id = 3` I could not get the display name, the back value is empty (I have checked the `wp_users` table, ID = 3 really has a member.)               header("Content-type: text/html; charset=utf-8");      $mysql_hostname = "localhost";     $mysql_user = "root";     $mysql_password = "root";     $mysql_database = "test_db";     $db = mysql_connect($mysql_hostname, $mysql_user, $mysql_password)     or die('Error connection to database server: ' . mysql_error());     mysql_select_db($mysql_database, $db)     or die('Error connection to database server: ' . mysql_error());     mysql_query("SET NAMES utf8");     $results = mysql_query("SELECT * FROM test_table where id = 3");     while($row = mysql_fetch_array($results)) {         //echo $row['id'];  I can get the $row['id'] value.         $foo_db = new wpdb('root','root','wp','localhost');          $foo_result = $foo_db->get_results("SELECT * FROM `wp_users` WHERE ID = '".addslashes($row['id'])."'",OBJECT);         foreach($foo_result as $user){              var_dump($user);         }     }      BTW: test_table is very simple, just has 1 field, record the user ID. (ID:1 - ID:33)


title: Help fixing custom post type and taxonomy rewrite rules

text: I have a custom post type called featured_property and related taxonomy called locations and am having trouble getting the URL structure I want. I'm SO close but having trouble with the top level parent page. Here's the URL structure I want:   * `/featured-properties`   * `/featured-properties/%location%/`   * `/featured-properties/%location%/individual-post-name` Currently, the code I'm using works perfectly for the bottom 2 URLs. If I have a taxonomy category of "denver," `/featured-properties/denver` and `/featured-properties/denver/individual-post-name` works. However, if I navigate to the root page for my custom post type, `/featured- properties`, it redirects to `/featured-properties/%location%/`. If I manually go to `/featured-properties`, I get a 404. Any help getting me there would be much appreciated.               // Custom post type and taxonomy for featured properties     function featured_post_type() {         register_post_type('featured_property',             array(             'labels' => array(                 'name' => __('Featured Properties', 'html5blank_webo'),                 'singular_name' => __('Featured Property', 'html5blank_webo'),                 'add_new' => __('Add New', 'html5blank_webo'),                 'add_new_item' => __('Add New Featured Property', 'html5blank_webo'),                 'edit' => __('Edit', 'html5blank_webo'),                 'edit_item' => __('Edit Featured Property', 'html5blank_webo'),                 'new_item' => __('New Featured Property', 'html5blank_webo'),                 'view' => __('View Featured Property', 'html5blank_webo'),                 'view_item' => __('View Featured Property', 'html5blank_webo'),                 'search_items' => __('Search Featured Properties', 'html5blank_webo'),                 'not_found' => __('No Featured Properties found', 'html5blank_webo'),                 'not_found_in_trash' => __('No Featured Properties found in Trash', 'html5blank_webo')             ),             'public' => true,             'hierarchical' => true,             'query_var' => true,             'rewrite' => array( 'slug' => 'featured-properties/%location%', 'with_front' => true ),             'has_archive' => true,             'menu_position' => 20,             'supports' => array(                 'title',                 'editor',                 'thumbnail'             ),             'can_export' => true,         ));     }          function featured_taxonomy() {        register_taxonomy(         'location',         'featured_property',             array(                 'hierarchical' => true,                 'label' => 'Locations',                 'query_var' => true,                 'rewrite' => array('slug' => 'featured-properties', 'with_front' => true)             )         );     }          add_action( 'init', 'featured_post_type' );     add_action( 'init', 'featured_taxonomy' );          // Rewrite rules for featured post type and tzxonomy     function filter_post_type_link($link, $post) {         if ($post->post_type != 'featured_property')             return $link;              if ($cats = get_the_terms($post->ID, 'location'))             $link = str_replace('%location%', array_pop($cats)->slug, $link);         return $link;     }


title: WP_enqueue_script() loads them always in wp_footer()?

text: This is my example code placed in functions.php:               function my_init_method() {         wp_enqueue_script('jquery');         wp_enqueue_script('jquery-ui-core', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-widget', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-mouse', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-accordion', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-slider', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-tabs', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-sortable', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-draggable', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-droppable', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-selectable', false, array('jquery'), false, false);         //wp_enqueue_script('jquery-ui-datepicker', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-resizable', false, array('jquery'), false, false);         wp_enqueue_script('jquery-ui-dialog', false, array('jquery'), false, false);         //wp_enqueue_script('jquery-ui-button', false, array('jquery'), false, false);     }     add_action('init', 'my_init_method');      Here is the reference: http://codex.wordpress.org/Function_Reference/wp_enqueue_script Why all scripts except jQuery are loading in `wp_footer()` and not `wp_head()`? I set last parameter to `false`. I also tried `true` and I tried completely deleting parameters like: `wp_enqueue_script('jquery-ui-core');`. Yet, they always load in footer.


title: submit for review issue

text: I have installed WordPress on my linode vps and it was running without a problem till today. Today I realized I dont have admin rights to post a page in wp-admin. It doesn't show me submit button, it shows me "submit for review" button instead. It is very odd because I am logged in with admin account and for example I can use theme editor, edit styles etc. I googled it and found something about "auto increment on primary keys are gone". What do you think?


title: how to use the new image size

text: I am new to wordpress and i want to use a size which can be 300 x 283, i tried the `the_post_thumbnail(array('300,283'))` but it didn't work, then i went to read about `add_image_size` which i added like so `add_image_size( 'homepage- thumb', 220, 180, true );`, gave my post_thumbnail same dimension but nothing happened, am i missing something? how to u my newly added `add_image_size` in `the_post_thumbnail`


title: Advice On Wrapping Text Around A Shortcoded Box

text: I hope someone can help me with this. I have very minimal css knowledge and I have tried to sort this out but so far have had to luck. I brought a plugin which creates boxes that can be customized. However, I wanted to float / align the box on the right (or maybe left) of the page, and I just cant get it to work. The problem is the box works via shortcode so I am not sure if that has an impact. The box in question is on this page. I have tried creating a div id to make the shortcode float left or right using:               .myslideshow {     float: right;     width: 45%;     }      That didn't work. Any help would be very gratefully received. (I have asked the plugin creator but he doesn't respond to support tickets). EDIT: Below is the code that I have been asked to extract that is created when the shortcode is parsed.               <script>         (function($) {             var $inner = $("#general-2_2493_link").parent('.block_inner');             $inner.hover(                 function(){                     if ("transparent" != 'transparent')                         $(this).css('background-color', "transparent");                 },                 function(){                     if ('transparent' != 'transparent')                         $(this).css('background-color', "transparent");                 }             );         })(jQuery);     </script>


title: Modifying the Default Registeration Page?

text: I want to modify the Default Registration Page of Wordpress. Want to add a few new fields and remove some. How should i go about it. I am an absolute begineer


title: Are shortcode functions applied while rendering the content, or are they executed and stored with the post content?

text: I'm not sure if I've asked the question properly, apologies for that! What I'm trying to do is, output a `<!--nextpage-->` tag via a shortcode. But it doesn't work, I guess because shortcodes are applied when the content is rendered, whereas `<!--nextpage-->` is resolved into links beforehand. Does anyone know if this can be done? Can I apply the `<!--nextpage-->` tag through my shortcode when the post is rendered?


title: How to add image for all posts associated to specified category?

text: simply i want to add image beside every post depend on the category something like that http://network.smashingmagazine.com/ you will see there is an image beside every post, i want it to be related to category, so i can upload an image for this category and all posts under this category will take this image did any body see plug-in do this job ? thx advanced for all


title: How to discover and delete unused accounts?

text: I'm running a Wordpress self hosted blog with registration and I would like to know if there is a safe way to know if users hasn't login yet or if account is unused by a long time. What I would like to achieve is to be able to automatically delete accounts that aren't unused by 6 months or more or not used at all. Any help? Thank you!


title: Add new section to "Right Now" widget

text:
I've been hacking away at modifying the "Right Now" widget in the WordPress dashboard, and although there are some hooks/filters which apply to just that, they are sparsely documented or explained. Using the example given here, I've created a new row of information in the "Content" section of the widget... I also tried a few other hooks and one of them placed my row of information in the "Discussion" section of the widget... However, I don't really feel that this data belongs in either of those two sections... Does anyone know how, or if it's possible to add a new section to the "Right Now" widget? I'd like to add my own section called "Feedback" which would be styled much like the comments ("Discussion") section. Here's the code I'm using at the moment:               function add_testimonial_counts() {       if(!post_type_exists('testimonials')) {         return;       }            $num_posts = wp_count_posts('testimonials');       $num = number_format_i18n($num_posts->publish);       $text = _n('Approved Testimonial', 'Approved Testimonials', intval($num_posts->publish));            if(current_user_can('edit_posts')) {         $num = "$num";         $text = "$text";       }            echo ''.$num.'	';       echo ''.$text.'	';       echo '
';            if($num_posts->pending > 0) {         $num = number_format_i18n($num_posts->pending);         $text = _n('Testimonial Pending', 'Testimonials Pending', intval($num_posts->pending));              if(current_user_can('edit_posts')) {           $num = "$num";           $text = "$text";         }              echo ''.$num.'	';         echo ''.$text.'	';         echo '
';       }            if($num_posts->draft > 0) {         $num = number_format_i18n($num_posts->draft);         $text = _n('Testimonial Draft', 'Testimonial Drafts', intval($num_posts->draft));              if(current_user_can('edit_posts')) {           $num = "$num";           $text = "$text";         }              echo ''.$num.'	';         echo ''.$text.'	';         echo '
';       }     }     add_action('right_now_content_table_end', 'add_testimonial_counts');      Here's a screenshot of how it currently looks just so you can get a better idea of what I'm jabbering on about. ![Right Now Widget Mods](http://i.stack.imgur.com/tYMjs.jpg)


title: Adding jquery using php function

text: I was turned down with this question because I get a php error and my question revolves around jquery, but when I take out the JQUERY everything works fine. *** Again I'm creating a wordpress plugin. I am trying show and hide options. *** Please any wordpress plugin creator with knowledge on how to implement jquery as a function please help. Please look at the question that was closed to see the script. Very similar question: Add a jQuery function to admin pages               function accordion() {     echo '<script type="text/javascript">     var $ = jQuery;     jQuery(function ($) {         $.fn.showHide = function (options) {          //default vars for the plugin              var defaults = {                 speed: 1000,                 easing: '',                 changeText: 0,                 showText: 'Show',                 hideText: 'Hide'                  };             var options = $.extend(defaults, options);                  $(this).click(function () {                           $('.toggleDiv').slideUp(options.speed, options.easing);                       var toggleClick = $(this);                       var toggleDiv = $(this).attr('rel');                       $(toggleDiv).slideToggle(options.speed, options.easing, function() {                  // this only fires once the animation is completed                  if(options.changeText==1){                  $(toggleDiv).is(":visible") ? toggleClick.text(options.hideText) :   toggleClick.text(options.showText);                  }                   });                    return false;                   });              };      })(jQuery);     </script>';     }                   add_action( "admin_footer", "accordion" );


title: Registration options and approvals

text: What are the possible registration options in Wordpress (everybody can register, nobody can register, only some users can register)? More specifically:   * can Wordpress be setup so that only those users that are previously approved are registered?   * can registrations by users be prevented altogether so that all registrations are done by the administrator?   * can all readers who wish so be registered?


title: Integrating Option Tree in my plugin

text: I am striving my best to integrate Option Tree plugin in my plugin, but couldn't integrate. Basically, when we want to integrate Option Tree in your Theme, you use below code in your functions.php file.               add_filter( 'ot_show_pages', '__return_false' );     add_filter( 'ot_show_new_layout', '__return_false' );     add_filter( 'ot_theme_mode', '__return_true' );     include_once( 'option-tree/ot-loader.php' );     include_once( 'inc/theme-options.php' );     include_once( 'inc/shortcodes.php' );     include_once( 'inc/sidebars.php' );      I tried the same code in my plugin file, but option tree isn't working. It always show me error: http://www.webpagescreenshot.info/i3/53a3e9fc0218b5-06184916 Is there a different way of integrating option tree in plugin?


title: I changed rightly the permalinks but I get empty pages in the final posts

text: I changed my permalinks to pretty ones(nameofcategory/nameofpost). The paths and the urls are perfectly formed, and I can see them when I go on the tittles, rolling over, but when I click, the final post becomes an empty page. I tried everything. Could someone help me? Most I change something in the_permalink or in single.php, or somewhere else to get effective the redirection from ugly permalinks to the pretty new ones? Thank you in advance


title: Wordpress multisite,use same cookies across all website?

text: Hi is this posible to use same custom cookies across all blogs?Can someone help me with this?


title: Get the tax term in which is a post via wp_query

text: I'll rewrite my original question because I feel like I can't be understood : I made a template page on which I have different `WP_Query`. I have a category taxonomy (countries). This template page matches with one of this tax's terms. For example, the page `France` matches with the category tax term               $countries->france      The administrator have the ability, if he wants, to create a translation which will be seen on the same page template. Those translated posts will be categorized with the same cat tag `$countries->france`, but with also another one (for e.g.):               $language->english      What I'd like to do now is to check if there is a matching post with both `france` and `english` cat terms, and if yes, return the language term (`english`) or any other one if it does exist. For example, I have this query:               // Get the language cat term ID     $parent_id = get_cat_ID( 'languages' );     // Get the child terms of language     $languages = get_term_children( $parent_id, 'category' );     // Put them in an array for the query     $langs = array();     foreach ( $languages as $key => $value ) {         $cat = get_category( $value, ARRAY_A );         $langs[] = $cat['slug'];     }     // The Query     $langQuery = new WP_Query( array(         'post_type' => 'post',         'tax_query' => array(             'relation' => 'AND',             array(                 'taxonomy'     => 'category',                 'category__in' => array( 'countries' ),                 'parent'       => '1',                 'field'        => 'slug',                 'terms'        => array( $cat[0] ) // The page's slug             ),             array(                 'taxonomy'     => 'category',                 'category__in' => array( 'languages' ),                 'parent'       => '1',                 'field'        => 'slug',                 'terms'        => $langs             )         )     ) );      Thanks for helping


title: A theme that follows all the best practices to learn from?

text: Are there any good themes that follows all the best practices, to the letter, that I can refer to will creating my themes?


title: Get Comments: Direct link to specific comment + post title

text:
I'm pretty sure that this can be solved quite easy, but for some reason I just can't get it to work. My current code looks like this:               <?php   $comments = get_comments('status=approve&number=5'); ?>
     <?php foreach ($comments as $comment) { ?>

<?php             $title = get_the_title($comment->post_ID);             echo get_avatar( $comment, '45' );     echo strip_tags($comment->comment_author); ?> commented on <a href="<?php echo get_permalink($comment->post_ID); ?>" rel="external nofollow" title="<?php echo $title; ?>"> <?php echo $title; ?>: <?php echo wp_html_excerpt( $comment->comment_content, 45 ); ?> (...)

     <?php }  ?>
      It works fine, but it only displays the post title and a link to it. I'd like to have the post title displayed, but have it linked directly to the specific comment. I suppose you'd use something like that:               <a href="<?php echo get_permalink($comment->ID); ?>#comment-<?php echo $comment->comment_ID; ?>" title="on <?php echo $comment->post_title; ?>">      I tried to implement this into the code above somehow. It works, but it suddenly shows the title of a post where the comment doesn't belong to. Anybody knows how to fix this? Thanks a lot in advance!


title: Painless way to track remote Git repo for Wordpress updates

text: I'm looking for a way to keep development instances of Wordpress up to date and under version control with Git. Has anyone managed to the following?   * set up git to track a repo containing the Wordpress core files   * add the Wordpress repo to a project via a submodule or similar   * get the latest version of WP from within the project by updating submodules (or whatever) Ideally you would just need to update the WP core files in one repository, and then upgrade other dev instances using a single git command. Anyone?


title: Create list from custom field comma separated values

text:
I've created a custom field named 'Essential Info', which I plan to allow the admin to add a list of values to. E.g. No Pets On-site doctor Car Parking 100m from beach ...etc. However, I'm not entirely sure how I can achieve this with custom fields. I was hoping that I could somehow allow the user to separate these values with a comma, and in the template tell it to output a separate list item everytime a value is separated by a comma. At the moment, this is my code which obviously outputs whatever is in the custom field, but I need the admin to be able to add a list of values rather than a single line value:

                 <?php if ( function_exists('get_custom_field_value') ){                         get_custom_field_value('Essentials', true);                 } ?>

      Thanks


title: Wordpress Queries Not Working?

text:
//Display All Reviews     function display_all_reviews( $query ) {         if ( $query->is_home() && $query->is_main_query() ) {             $query->set( 'tag', 'reviews' );         }     }     add_action( 'pre_get_posts', 'display_all_reviews' );          //Movie All Reviews     function display_movie_reviews( $query ) {         if ( $query->is_home() && $query->is_main_query() ) {             $query->set( 'tag', 'movie-reviews' );         }     }     add_action( 'pre_get_posts', 'display_movie_reviews' );      `Display All Reviews` is the only thing that is suppose to be displayed on the homepage and `display_movie_reviews` is suppose to be displayed in the sidebar for its category `is_category('movies')`, as well as posts in that category. I see they have `$query->is_home()` but I have tried `is_category('movies')` without any luck.. Here is the `display_movies_reviews` markup for the category:
         Movie Reviews
             <?php if ( have_posts() ) : ?>             <?php /* Start the Loop */ ?>             <?php add_action( 'pre_get_posts', 'display_movie_reviews' ); ?>             <?php while ( have_posts() ) : the_post(); ?>             <?php get_template_part( 'sidebar-reviews', get_post_format() ); ?>             <?php endwhile; ?>             <?php else : ?>             <?php get_template_part( 'no-results', 'index' ); ?>             <?php endif; ?>

      And here is the `display_movies_reviews` markup for the posts within the movies category:                    <?php elseif ( ! empty ( $GLOBALS['post'] ) && is_single() && in_category( 'movies', $GLOBALS['post'] ) ) : ?>

         Movie Reviews
             <?php if ( have_posts() ) : ?>             <?php /* Start the Loop */ ?>             <?php add_action( 'pre_get_posts', 'display_movie_reviews' ); ?>             <?php while ( have_posts() ) : the_post(); ?>             <?php get_template_part( 'sidebar-reviews', get_post_format() ); ?>             <?php endwhile; ?>             <?php else : ?>             <?php get_template_part( 'no-results', 'index' ); ?>             <?php endif; ?>

      I have tried fixing it like this:               //Movie All Reviews     function display_movie_reviews( $query ) {         if ( $query->is_category('movies') ) {             $query->set( 'tag', 'movie-reviews' );         }     }     add_action( 'pre_get_posts', 'display_movie_reviews' );      but havent had any luck. Any ideas how I can get the homepage and sidebar working? **edit: sidebar**               <?php if ( $query->is_category('movies') ): ?>     <?php $movies = new Wp_Query('tag=movie-reviews'); ?>          <?php while ( $movies->have_posts() ) : ?>     <?php $movies->the_post(); ?>     <?php get_template_part( 'sidebar-reviews', get_post_format() ); ?>     <?php endwhile; ?>     <?php else : ?>     <?php get_template_part( 'no-results', 'index' ); ?>     <?php endif; ?>


title: nginx or cherokee ( +php-fpm ) for WordPress backend?

text: For years, I've been using apache2 with mod_php, but recently I migrated to nginx with php-fpm. Although it is a lot faster and more stable, I also took a look at cherokee, since both can handle php-fpm and tons'o'visitors. Whick server is better as a WordPress host, does anyone made comparison about this? ## UPDATE Rarst asked to be a bit more specific with the question, so the objectives (in order):   * speed   * stability   * security   * predictable memory usage


title: Populate content on install

text: I would like to know if there's a way to populate a WordPress site with some dummy content while installation process is going on. Let's say a few sample pages, a fews posts, taxonomy and that's it. I'm not sure if this is possible since I haven't found proper documentation.


title: Security and Must Use Plugins

text: From the codex article on Must Use Plugins: > Can be enabled simply by uploading file to the mu-plugins directory, without > having to log-in This feels like a potential security problem to me. Regular plugins have to be activated via the admin panel before any code from the plugin runs on the site. I always thought this was a sensible security precaution because an attacker who was somehow able to upload a file to the plugins folder would also have to access and modify the database before he could get the code to run. The `mu-plugins` folder seems to provide a simple way to circumvent that. I know the WordPress devs know a bit more about security than I do, so I was just wonder if someone could explain why this isn't a security hole.


title: WordPress Multisite, NGINX and WordPress Subdirectory Install

text: I'm attempting to set up WordPress skeleton (https://github.com/markjaquith/WordPress-Skeleton/) in a multisite configuration. WordPress skeleton already places WordPress in a subdirectory (wp by default). I've taken the following steps:   * git clone WordPress-Skeleton    * Update Submodules and checkout 3.6.1 tag   * Setup local-config.php to point to my local DB Install WordPress, set site settings to example.com (site), example.com/wp (WordPress URL)    * Configured multisite (subdirectory) and configured NGINX to serve the Multisite properly (NGINX config can be found here:   https://gist.github.com/tmort/6582961) Once all of this is configured, I can see that the main site (example.com and example.com/wp/wp-admin) both work. I then add a new site to the network. Upon navigating to the site url (example.com/test-network-site) the front-end is broken (style.css, for example, cannot be found at the URL http://example.com/wp/test-network- site/wp-content/themes/twentythirteen/style.css?ver=2013-07-18). When navigating to the wp-admin, I'm in a redirect loop. My end goal is to be able to use WordPress Skeleton as a base for the sites I deploy and have the multisite configuration work as it does normally (where example.com is the network main site, example.com/test-network-site is a site within the network, and example.com/test-network-site/wp-admin works as it should). At this point my main question may be is this even possible? I have a good feeling that the NGINX configuration is the main issue as (for fun) I created the exact same environment locally and fired up MAMP. Under MAMP, this configuration works fine. Unsure of how to move forward. Any insight would be greatly appreciated!


title: Wordpress SMTP EMail

text:
I have this plugin on wordpress an already configure class-phpmailer.php to send emails by SMTP. My hosting only accept SMTP emails. When I register in wordpress I receive an email, when I contact anothe user he receives emails. This is ok. But when I try to use this plugin he doesn't send any emails. Could you help me please? Thank you in advance                <?php          ini_set('display_errors',true);     ini_set('memory_limit', '128M');          require dirname(__FILE__).'/../../../wp-config.php';              $db = new PDO ('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASSWORD);     function update_date_format(){     $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);     if (strpos($lang, 'pt') > 0){         $date_format = 'd/m/Y'; // 25/12/2011     }else{         $date_format = 'd/m/Y'; // 12/25/2011     }     update_option('date_format',$date_format);     }               // get config     $site_url  = get_option ('siteurl');     $from      = get_option ('admin_email');     $blog_name = get_option ('blogname');     $logo      = get_option ('cp_logo');     $date_format = get_option ('date_format');     $link_edit = $site_url.'/'.get_option ('cp_edit_item_url').'/?aid=';          $subject   = get_option ('adsstatsemail_subject');     $header    = get_option ('adsstatsemail_header');     $footer    = get_option ('adsstatsemail_footer');     $campaign  = 'utm_source=Weekly%20Ads%20Stats&utm_medium=email&utm_campaign='.urlencode(get_option ('adsstatsemail_campaign'));     $ad_title  = get_option ('adsstatsemail_adtitle');     $ad_week   = get_option ('adsstatsemail_adweek');     $ad_total  = get_option ('adsstatsemail_adtotal');     $ad_expire = get_option ('adsstatsemail_adexpire');     $ad_edit   = get_option ('adsstatsemail_adedit');          update_date_format();     $week_start = time()-(86400*6);               // replace macros     $header = str_replace ("\n\n", "
", $header);     $header = str_replace ('{date_from}', date($date_format, $week_start), $header);     $header = str_replace ('{today}', date($date_format), $header);     $header = str_replace ('{site_link}', "{$site_url}

", $header);     $header = str_replace ('{site_logo}', "

", $header);          $footer = str_replace ("\n\n", "
", $footer);     $footer = str_replace ('{date_from}', date($date_format, $week_start), $footer);     $footer = str_replace ('{today}', date($date_format), $footer);     $footer = str_replace ('{site_link}', "{$site_url}", $footer);     $footer = str_replace ('{site_logo}', "", $footer);               // fetch ad info     $sql = "         SELECT              p.ID,             p.post_title,             p.post_date,             pm.meta_value AS expireDate,             u.user_email,             u.display_name,             t.postcount AS total,             SUM(d.postcount) AS week         FROM              wp_posts as p             INNER JOIN wp_postmeta AS pm ON p.ID=pm.post_id AND pm.meta_key = 'cp_sys_expire_date'             INNER JOIN wp_users AS u ON u.ID=p.post_author             INNER JOIN wp_cp_ad_pop_total AS t ON t.postnum=p.ID             INNER JOIN wp_cp_ad_pop_daily AS d ON d.postnum=p.ID AND d.time >= DATE_SUB(NOW(), INTERVAL 1 WEEK)          WHERE             p.post_type = 'ad_listing'         GROUP BY p.ID         ORDER BY u.ID     ";          $sth = $db->query ($sql);          $list = array ();     while ($row = $sth->fetch (PDO::FETCH_ASSOC)) {              // remove expired ads         if (strtotime($row['expireDate']) <= $week_start) {              continue;         }              $mail = $row['user_email'];         unset ($row['user_email']);              $list[$mail][] = $row;     }               // prepend header     $header = "                  <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>                  {$header}

         {$ad_title}	         {$ad_week}  	         {$ad_total}  	         {$ad_expire}
";          // footer     $footer = "
      {$footer}            ";               $count = 0;          foreach ($list as $email => $ads) {              $html = $header;              foreach ($ads as $ad) {                  $ad['expireDate'] = date($date_format, strtotime ($ad['expireDate']));             $ad['post_title'] = utf8_encode($ad['post_title']);                  $html .= "
         {$ad['post_title']}  	         {$ad['week']}	         {$ad['total']}	         {$ad['expireDate']}	         {$ad_edit}
";              }              $html .= $footer;              $headers = "From: {$blog_name} <{$from}>\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=utf-8\r\n";         mail ("{$ad['display_name']} <$email>", $subject, $html, $headers);              echo "$email\n";         $count++;     }          echo "\nDone ($count emails).\n\n";


title: Comments are invisible, what's the problem with wp_list_comments?

text:
My code is the following:               <?php get_header(); ?>

                  <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<?php the_title(); ?>
                 <?php the_content('Read More...'); ?>
                     by <?php the_author(); ?>,                     at <?php the_time('l F d, Y'); ?>
                 <?php previous_post_link(); ?> / <?php next_post_link(); ?>
                  <?php endwhile; else: ?>
<?php _e('No posts were found. Sorry!', 'magaziner'); ?>
             <?php endif; ?>
                 <?php wp_list_comments(); ?>
             <?php comment_form(); ?>
              <?php get_sidebar(); ?>
     <?php get_footer(); ?>      I see only the form, but the comments are not visible. What's wrong?


title: How to get the url to tag & category base set by the user?

text: I'm searching for half an hour now on how to get the url/permalink base in Wordpress (the 'category' and 'tag' value set in the backend). Could you please point me in the right direction? I want to dynamically print the following - but only replace the `tags` and `category` part (not the tag/category itself):               My Tag     My Category


title: Calling a javascript function in post edit page after attaching something to post

text: I would like to call a javascript function after user attaches something to post. I hooked the `add_attachment` hook, and processed what I want. However, how can I call a function in a Javascript loaded in the post edit page? Just printing the javascript in the function doesn't work, as I guessed.               function analyse_attachment($attachment_ID) {         // Some awesome codes here         $var = 5;              //Trying to call a javascript function here         print "<script>             alert('I am never shown.');             AJavaScriptFunctiononLoadedinPostPage('passing parameter $var');             </script>";     }          // attach our function to the correct hook     add_action("add_attachment", 'analyse_attachment');     add_action("edit_attachment", 'analyse_attachment');      Maybe I need to do something with media_send_to_editor hook?


title: TED talks shortcode not working

text: I am trying to embed a Ted talk video using the shortcode:               [ted id=myid]      But it's not working. It shows the text instead of the video. Is there any configuration I need to check to make it work?


title: Create a new template for twentytwelve

text: Twenty Twelve comes with some page templates: Front Page & Full Width. These are in the folder /page-templates. I've created my own template and saved it into this folder, but it is not present to be selected when editing a page. There is no mention of the two page templates in functions.php What do I need to do to include my new page template?


title: Menus not showing in the admin menu, after save

text: I updated wordpress to v3.9, I added several custom links and pages in that menu, saved it and after that the menu editing UI disappeared: Here is image how it looks now and what JS error it displays: ![enter image description here](http://i.imgur.com/Eu4EFiLs.png)   Things which i noticed:   * If I remove `post_type=nav_menu_item` from `wp_posts` and then the UI appear, of course without lunks, but right before the next save.


title: 404 Error is showing when open page posts

text: I just downloaded the video theme from templatic, when i am displaying videos from the thumbnail, it shows 404 error **Link to the page** It is not showing the video, how to avoid this problem and show video.


title: Restrict Access in Admin Panel

text: I want to restrict access to certain plugin pages / normal WP Pages. I've found a way to Hide these pages from the menu but currently not restrict them. For instance, I have an editor and I don't want them to have access to `Media` and `Tools` \- I can hide those pages via this:               function editor_menu() {         global $menu;              if(!current_user_can('administrator'))         {             $restricted = array(__('Media'),__('Tools'));             end ($menu);             while (prev($menu)){                 $value = explode(' ',$menu[key($menu)][0]);                 if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}             }         }     }     add_action('admin_menu', 'editor_menu', 999);      But how can I restrict them from viewing this page entirely? Like permissions?


title: How to make simply "report" button on posts

text: I'm building up a video-site using wordpress. It embeds videos from different sites. I really need a simply "Report broken video"-button that saves the url in a database or emails it to me. I've searched through some plugins, but can't find any that does the job. Do you guys know any simple and easy solution to this? Thanks :-)


title: Edit permalink before publishing a post

text: How can I check and edit permalink of a post before it publishes. Using permalink is not enough customized, because I want my permalink to be like:               http://example.com/author_custom_generated_id/category_custom_generated_id/post-name


title: How to efficiently load and use the wordpress API from outside the original structure

text: I want to call Wordpress functions (the same ones we use to build a theme) from outside the original structure / folder / files of Wordpress. For example, in my theme folder I created a folder called **custom** , in which I create files such as **header-small.php** , **header-medium.php** , etc. So every one of these custom php files calls WP functions. I know I must include **wp-load.php** and it works fine, but I am worried about load time and performance, and whether I am loading more things than I need. Is there an efficient way to use the API without loading all of Wordpress? Thanks


title: nginx + W3 Total Cache: rewrite rules issue

text: nginx 1.2.7 + WP 3.5.1 + W3TC 0.9.2.8. Rewrite rules generated by the plugin simply don't work, server returns 404 after including them in nginx server config. Or maybe I'm doing something wrong? Here is my **nginx.conf** :               user www-data;     worker_processes 2;     pid /var/run/nginx.pid;          events {         worker_connections 1024;     }          http {         include /etc/nginx/mime.types;         index index.html index.htm index.php;         default_type application/octet-stream;              sendfile on;         tcp_nopush on;              log_format main '$remote_addr - $remote_user [$time_local] '             '"$request" $status $body_bytes_sent "$http_referer" '             '"$http_user_agent" "$http_x_forwarded_for"';              access_log /var/log/nginx/access.log main;         error_log /var/log/nginx/error.log warn;              include /etc/nginx/conf.d/*.conf;     }      Here is my **virtual server config** :               server {         listen 80;              server_name example.com www.example.com;         root /var/www/example.com;              access_log /var/log/nginx/example.access.log;         error_log /var/log/nginx/example.error.log;              location / { try_files $uri $uri/ /index.php?$args; }              location ~ \.php {             try_files $uri =404;             fastcgi_pass unix:/var/run/php5-fpm.sock;             fastcgi_index index.php;             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;             include fastcgi_params;         }              include /var/www/example.com/nginx.conf;          }      And finally **config generated by W3TC** (included in server's config):               # BEGIN W3TC Minify cache     location ~ /wp-content/cache/minify.*\.js$ {         types {}         default_type application/x-javascript;         expires modified 2628000s;         add_header X-Powered-By "W3 Total Cache/0.9.2.8";         add_header Vary "Accept-Encoding";         add_header Pragma "public";         add_header Cache-Control "max-age=2628000, public";     }     location ~ /wp-content/cache/minify.*\.css$ {         types {}         default_type text/css;         expires modified 2628000s;         add_header X-Powered-By "W3 Total Cache/0.9.2.8";         add_header Vary "Accept-Encoding";         add_header Pragma "public";         add_header Cache-Control "max-age=2628000, public";     }     location ~ /wp-content/cache/minify.*js\.gzip$ {         gzip off;         types {}         default_type application/x-javascript;         expires modified 2628000s;         add_header X-Powered-By "W3 Total Cache/0.9.2.8";         add_header Vary "Accept-Encoding";         add_header Pragma "public";         add_header Cache-Control "max-age=2628000, public";         add_header Content-Encoding gzip;     }     location ~ /wp-content/cache/minify.*css\.gzip$ {         gzip off;         types {}         default_type text/css;         expires modified 2628000s;         add_header X-Powered-By "W3 Total Cache/0.9.2.8";         add_header Vary "Accept-Encoding";         add_header Pragma "public";         add_header Cache-Control "max-age=2628000, public";         add_header Content-Encoding gzip;     }     # END W3TC Minify cache     # BEGIN W3TC Page Cache cache     location ~ /wp-content/cache/page_enhanced.*html$ {         expires modified 3600s;         add_header X-Powered-By "W3 Total Cache/0.9.2.8";         add_header Vary "Accept-Encoding, Cookie";         add_header Pragma "public";         add_header Cache-Control "max-age=3600, public";     }     location ~ /wp-content/cache/page_enhanced.*gzip$ {         gzip off;         types {}         default_type text/html;         expires modified 3600s;         add_header X-Powered-By "W3 Total Cache/0.9.2.8";         add_header Vary "Accept-Encoding, Cookie";         add_header Pragma "public";         add_header Cache-Control "max-age=3600, public";         add_header Content-Encoding gzip;     }     # END W3TC Page Cache cache     # BEGIN W3TC Browser Cache     gzip on;     gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;     location ~ \.(css|htc|js|js2|js3|js4)$ {         expires 2628000s;         add_header Pragma "public";         add_header Cache-Control "max-age=2628000, public";         add_header X-Powered-By "W3 Total Cache/0.9.2.8";     }     location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {         expires 3600s;         add_header Pragma "public";         add_header Cache-Control "max-age=3600, public";         add_header X-Powered-By "W3 Total Cache/0.9.2.8";         try_files $uri $uri/ $uri.html /index.php?$args;     }     location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {         expires 31536000s;         add_header Pragma "public";         add_header Cache-Control "max-age=31536000, public";         add_header X-Powered-By "W3 Total Cache/0.9.2.8";     }     # END W3TC Browser Cache     # BEGIN W3TC Minify core     rewrite ^/wp-content/cache/minify.*/w3tc_rewrite_test$ /wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1 last;     set $w3tc_enc "";     if ($http_accept_encoding ~ gzip) {         set $w3tc_enc .gzip;     }     if (-f $request_filename$w3tc_enc) {         rewrite (.*) $1$w3tc_enc break;     }     rewrite ^/wp-content/cache/minify/(.+\.(css|js))$ /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1 last;     # END W3TC Minify core     # BEGIN W3TC Page Cache core     set $w3tc_rewrite 1;     if ($request_method = POST) {         set $w3tc_rewrite 0;     }     if ($query_string != "") {         set $w3tc_rewrite 0;     }     if ($request_uri !~ \/$) {         set $w3tc_rewrite 0;     }     if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") {         set $w3tc_rewrite 0;     }     set $w3tc_enc "";     if ($http_accept_encoding ~ gzip) {         set $w3tc_enc _gzip;     }     if (-f "$document_root/wp-content/cache/page_enhanced/$http_host/$request_uri/_index.html$w3tc_enc") {       set $w3tc_rewrite 0;     }     if ($w3tc_rewrite = 1) {         rewrite .* "/wp-content/cache/page_enhanced/$http_host/$request_uri/_index.html$w3tc_enc" last;     }     # END W3TC Page Cache core      Server returns 404. What's wrong? Desperate for your help, Wordpress Answers.


title: how to find and correct plugin query performance issues

text: I have recently uploaded a new site I've been working on for a while - which is working and performing very well on the localhost - there is no notable sluggishness to the load-times. Once uploaded to the server ( dreamhost dreampress WordPress optimized VPS ) - the site is so slow as to be almost unusable - what should I test, how and with what tools? While my question may be very specific - I'd like to know about a good general routine for debugging and fixing this type of environmental difference - and include the following data to show people what I've looked into so far. Update --- : The number of requests and cached hits to the database is roughly equal between the local and live site - but the main problem seems to be a very long "waiting" cycle on page loads - between 10 - 20 seconds - but how can I find out what is happening in that time - what is the site waiting for? Update ---- : Tested page load via pingdom \- averaging about 12 - 15 seconds to load Tested DNS - all 6 tests passed without error Tested Ping / TraceRoute - all clear Plugin Data ---- : Here is a pie chart from the godaddy P3 plugin for the localhost plugin resource usage and load time impact: ![enter image description here](http://i.stack.imgur.com/aTZK6.png) However, once uploaded ( to dreampress WordPress optimized VPS server ) the site is so sluggish and unresponsive, it's almost unusable - here is the same data from the live site: ![enter image description here](http://i.stack.imgur.com/a4BeV.png) The SabaiDiscuss Wrappers plugin goes form using 4% or resources to over 50% - the number of queries jump from 71 to 159 There are two additional plugin running on the live site - MinQueue to cache and minify scripts / sources and another debugging plugin. Debug Bar gives me these two sets of data: Localhost ---- :               PHP     5.3.5     MySQL     5.5.8     Memory Usage     35,760,984 bytes          TOTAL QUERIES:     82     TOTAL QUERY TIME:     56.2 ms      Development Server --- :               PHP     5.3.27     MySQL     5.0.67     Memory Usage     29,408,256 bytes          TOTAL QUERIES:     88     TOTAL QUERY TIME:     6,497.3 ms      Which seems to show the same number of queries are being run, but taking 1000 times longer to complete.


title: Disable inline_edit() on edit.php

text: In the class `WP_Posts_List_Table` there is a function named `inline_edit()` and it is responsible for rendering the entire quick edit table that is used (but initially hidden) on `wp-admin/edit.php`. I want to **prevent** that table from being rendered because the site I'm working on has thousands of category terms and they all get added to this quick edit table as list items with checkboxes. It makes `edit.php` huge and slow loading (and in certain cases with some jQuery plugins even make some browsers stall). I have not found any way, with filters or actions in `WP_Posts_List_Table`, to prevent this table from being rendered. Nor no way to make `edit.php` _not_ call `$wp_list_table->inline_edit();` at the end. Is there some (proper) way to achieve my goal? Without hacking core, of course. (I do know how to disable the quick edit link in the post rows with `post_row_actions` filter but that huge table is still being rendered and sent with `edit.php`.)


title: W3 Total Cache doesn't detect memcached

text: I have a wordpress installation (latest version) running on a debian server with memcached and php5-memcached installed (memcache appears on phpinfo()), but W3 Total Cache doesn't seem to recognize it, the compatibility test reports the extension as not installed and doesn't offer memcaced as an option in the various cache configurations. PHP is running as FastCGI if that's important. How can I get memcache to work with W3TC?


title: WooCommerce - how to display product category above product?

text: I'm a newbie at modifying wooCommerce. I hope someone can help me with a problem i'm having while trying to make a minor change to the plugin to fit with a request from my client. I'm trying to modify WooCommerce to display the category name for each product. **I want the category name to be shown above the product image on the main shop page**. (the view where many products are shown on the screen at once) I've searched around, and i can't seem to find how to call the product->category to get the category name for each product being shown. In the wooCommerce files, i've found content-product.php   (in templates/content-product.php) and i'd like to inject the category for each product by adding to this action: `do_action( 'woocommerce_before_shop_loop_item_title' );` I understand that I can add a function in my theme's functions.php to inject some new code into the ''woocommerce_before_shop_loop_item_title' but I can't work out how to get the category for each product. can someone help? or tell me where i might be able to find the answer? any help will be much appreciated, thank you!


title: How to show year/month archive including months with no posts

text:
I found a partial answer at: http://floatleft.com/notebook/wordpress-year- month-archives/ This solution shows all months that have posts. Its not even that much code:               <?php             $year_prev = null;             $months = $wpdb->get_results(   "SELECT DISTINCT MONTH( post_date ) AS month ,                                             YEAR( post_date ) AS year,                                             COUNT( id ) as post_count FROM $wpdb->posts                                             WHERE post_status = 'publish' and post_date <= now( )                                             and post_type = 'post'                                             GROUP BY month , year                                             ORDER BY post_date DESC");             foreach($months as $month) :                 $year_current = $month->year;                 if ($year_current != $year_prev){                     if ($year_prev != null){?>
                     <?php } ?>
<?php echo $month->year; ?>

                 <?php } ?>
                     <a href="<?php bloginfo('url') ?>/<?php echo $month->year; ?>/<?php echo date("m", mktime(0, 0, 0, $month->month, 1, $month->year)) ?>">                         <?php echo date("F", mktime(0, 0, 0, $month->month, 1, $month->year)) ?>
             <?php $year_prev = $year_current;             endforeach; ?>
      My problem is that the designer added all the months, not just the ones that have posts. How could I edit this to show all months, not just the ones with posts. I am using 3.8.1 thanks


title: Echo User Avatar from Mainsite in Multisite subsite

text: Users can register and set a custom avatar on my multisite mainsite (`example.com`). I also have two subsites with subdomain set up - for example: `xy.example.com` On my main site I echo the user avatar with this code:               <?php global $current_user; get_currentuserinfo(); echo get_avatar( $current_user->ID, 30 ); ?>      **My Problem:** The user avatar doesn't show up on my subsites. The users are already listed in my subsite backend. Is there any way to echo the same avatar for each user from the mainsite on my subsite `xy.example.com`? I read, is that possible something with the blog id? But have no idea how this work. Would be great if someone can help me out.


title: Migrating Multisite setup to a different domain

text: I have migrated my wordpress(with network sites enabled) to another domain, changed domain in wp-config.php and change the domain column for the only blog in wp_blogs table in db to the new domain. Problem is i don't see Network Menu anymore when i click my username. If i delete everything else besides: `define('WP_ALLOW_MULTISITE', true);` and click on network setup, it says that the network is already setup, still i repaste the shown instructions in wp-config.php[after deleting previous] and .htaccess, but no use. PS: I also changed my username from "a" to webmaster in db during the process, changed it everywhere.


title: Facebook like plugin with Multi Option-Needed

text: i need to integrate facebook like button with some of additional features. those are..   * every article/post has a 'Like' button (so that using this, when someone clicks 'Like' it'll appear in their Facebook news feed and add them to my Facebook page count direct from within my site)  please help me to get all these features with like button. is there any plugin done? or how to achieve from code?


title: Prevent empty Post Title on form submit via front end post (wp_insert_post_)

text: I am creating a post from the front end using (shortened for brevity);               if (empty($_POST['my_title'])){           echo 'error: please insert a title';     } else {           $title =  $_POST['my_title'];     }           $new_post = array(     'post_title'    => $title,     'post_status'   => 'publish',     'post_type'     => 'post'          $pid = wp_insert_post($new_post);         If no Post Title is present on **submit** then the form returns the error message, **error: please insert a title** However WordPress still inserts the post with a title of **(no title)**. Is there a way through simple PHP validation to prevent `wp_insert_post` from accepting an empty value? _(without using Javascript)_. ![IMAGE](http://i.imgur.com/QqjSM.jpg)


title: Why users disable the WordPress update?

text: Users install plugins which disable update reminders. Plugins:   * disable WordPress Core Updates   * disable WordPress Plugin Updates   * disable WordPress Theme Updates Look at the counter of plugins downloads. I know that some users change the WordPress core files or plugin or theme files, but there is WordPress hooks and child themes. If user will disable the updates:   * user will not see new features of newer WP versions or plugins or themes;   * user will use software without bug fixes and probably with security issues **So why users disable the WordPress update?** Is there any other reasons disabling updates except of modifying the files?


title: Setting title using wp_title filter

text: I want to do something very simple but I'm stuck finding where in WordPress I need to perform this. When someone on my WordPress site visits a blog post page I want the title in the blog post to replaced the title of the page. I think I can do this with the wp_title filter hook? I thought about something like the following :-               add_filter('wp_title', 'filter_pagetitle');          function filter_pagetitle($title) {      $the_post_id    = get_the_ID();      $the_post_data  = get_post($the_post_id);      $title = $the_post_data->post_title;           return $title;     }      However I am a bit lost as to where I put this, I thought it would need to be in loop-single.php as I want this to apply only to single pages, but I have also seen that this needs to be in functions.php within my theme? Any help would be appreciated :-) Rich


title: How to add code just below opening body tag in Genesis framework

text: We need to add two snippets of code, one right below the opening body tag, and the other right before the closing body tag. What is the best way to do this? I checked out the wp_enqueue_script, but it appears the content would be in the head section.


title: Form submit from modal window to parent window

text: Trying to submit a field value from a popup modal window to my WordPress parent window meta-box. On my add post page I have a metabox with a field type 'text'. ![Meta-box](http://i.stack.imgur.com/ZmIoA.png) The id of my 'text' field type input is 'tumble2_kaltura-video' Next to the metabox text field is a button link which opens up a modal box: ![Kaltura popup window](http://i.stack.imgur.com/58Exe.png) Once I select my video in the modal box, there is a submit button that when clicked will send out a shortcode. _Normally this shortcode is sent to the wp- editor_ ![shortcode output to editor](http://i.stack.imgur.com/brn7h.png) What script do I need to use in order to send the shortcode from the modal box to the metabox text field 'tumble2_kaltura-video'? Here is my kaltura code that is 'in charge' of normally sending the value to the editor. Need to change something in here to target my metabox instead. https://gist.github.com/3162011 I tried pasting my code in here instead of gist, but no matter how I formatted it, it was always messed up.


title: How to check if txt file exists inside template folder?

text: I have a folder inside my theme where I hold some txt files which I am including in a theme. The problem is that before including txt file I need to check if it does exist. I fail checking it the following way and have no idea why it wont work, always returns false.               $themeLocation = get_bloginfo('template_url');     $fileName1 = $themeLocation.'/txtfolder/file1.txt';          if(is_file($fileName1)){        echo 'It does exist';     } else {        echo 'Error';     }


title: Get value of custom field in category admin

text: I am using cfs-custom-category-fields plugin. In their documentation it says that to get the value of a custom field in category you should use `CfsTaxonomy::get('field_name')` This works well when I am in a category page, like `category-24.php`. But it doesn't work in `index.php`. How do I get the value in a non-category page? I tried something like this:               $cat_id = 29;         if($cat_id=29){             echo CfsTaxonomy::get('arata_in_listare');         }?>       But it doesn't work. I suppose I need to create a category page-like environment.


title: How can I install my custom-made theme on a wordpress.com blog?

text: I've only ever worked with WordPress on my own server. I'm using wordpress.com for my development environment, but I can't for the life of me figure out how to upload my themes since as far as I know I have no FTP access... I'm sorry if this is something that should be obvious, but all I'm finding in searches is how to FTP themes into personal WP installs, which I already know.


title: using post meta data as permalink tags

text: I have a client who would like their wordpress permalinks to look like this:                /%category%/%state%/%city%/%street%/      I can get this information easily enough with custom meta data in the post editor, but I'm at a loss to see a method for creating custom permalink tags. Can anyone tell me how this might be achieved? Cheers!


title: How to Use metada Value in Url and is it possible?

text: > **Possible Duplicate:**   >  How to use Post Custom Metadata in Post Titles and Post Permalinks hii i want to know that how can i use my metadata value for post url which i add with my every post in custom field First of all is this possible to make url with that and fetch post data with value. Like domain.com/metadata_value And if it is possible where become the Wordpress POST PERMALINK Function? that i can edit that manually And How ? And is thiS safe and Faster Method or it can crate troubles or can damage my word press Speed ?and how much effect on speed and SEO Thanks


title: How to use Post Custom Metadata in Post Titles and Post Permalinks

text: I am very new to WordPress. How can I use post custom metadata in place of Post Titles, and as the Post Permalink? For example, instead of `domain.com/the-post-title`, the permalink would be `domain.com/$postcustommetadata`. I posted my idea in the WPORG support forums. I have a general idea, but don't know how to implement it, because I don't yet fully understand WordPress conventions, classes, etc. Thanks Plzz HeLp


title: Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)

text: It's something I noticed ever since I started working with WordPress. It's a universal issue, in the sense that it doesn't matter if the WP installation is on my shared hosting account (haven't tried different providers though), or a local LAMP setup. Brand-new, clean WordPress, with 1 post, 1 page, and defaukt theme - or old WP, with hundreds of posts, a heavy theme and tons of plugins... doesn't make a difference. Currently working on a screaming fast local virtual machine (i7-3930k with a fast SSD, CentOS 6.2, Softaculous, standard Apache and MySQL, nothing else running on the box) and the scenario goes like this:   1. First time load, any front- or backend pages: about 1 second delay.   2. Subsequent load of the same or ANY OTHER PAGE (front- or backend), WITHIN ~25 seconds: virtually instantaneous response.   3. Wait 25 seconds, reload, the 1-second delay is back This 25-second interval is about the best measurement I was able to do within the limits of my patience, but it's got pretty good accuracy and repeatability. Further observations:   * Different installations on the same LAMP are "isolated" from each other, i.e. loading one site, then immediately loading another one does not make the latter to load fast.   * My current "solution" is having a tab open with a dummy page that reloads itself every 20 seconds Did anyone else notice this issue? What could it be? I'd be happy to provide any and all details to help track this thing down. Thank you all!


title: Match two posts in categories

text: I have blog posts each having three or more categories. The issue is that I need to search related posts and I have to match at least two categories i.e. there must be two common categories. I am using this query:                  $args = wp_parse_args($args, array(         'showposts' => 10,         'post__not_in' => array($post_id),         'ignore_sticky_posts' => 1,         'category__in' => wp_get_post_categories($post->ID)     ));         $query = new WP_Query($args);      I am trying `category__in` but it gives all posts which match even just one category.


title: Move wp-content htacess

text: I notice that when I rename the wp-content and plugins folders http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content my multisite network htacess still references wp-content: see this line below: RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]               RewriteEngine On     RewriteBase /     RewriteRule ^index\.php$ - [L]          # uploaded files     RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]          # add a trailing slash to /wp-admin     RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]          RewriteCond %{REQUEST_FILENAME} -f [OR]     RewriteCond %{REQUEST_FILENAME} -d     RewriteRule ^ - [L]     **RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]**     RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]     RewriteRule . index.php [L]      What should the proper rewrite rule be if you move wp-content?


title: Modify search function in WordPress (TwentyTwelve)

text: I want to remove "Search for" text from search form in TwentyTwelve, to wrap in in a div for styling, and probably to play with php a bit – and I'd appreciate some advice on how to do that best. My "sub-questions within a question": 1) Where is the main search function is located? 2) Should I create a separate custom file, add code to functions.php - or is it okay in this case to just edit the original search function? Thank you in advance for your help!


title: MP3 Manager for Wordpress

text: Looking for the following functionality, there does not seem to be a single way to do this, at least not that I was able to find. I would gladly pay for a plugin that did all of this to save me the time of writing one. This is for a bands' site, so keep that in mind.   * Create a new post type of Albums   * Allow admins of the site, in a user friendly way, to upload multiple MP3 files at once.   * Parse ID3 tags from the albums.   * Using the files' ID3 tags, create a post of the Album title if one does not exist.   * When the album post type for each individual album is clicked, it displays all of the tracks and users can play these tracks from the site or download them. Does this functionality (or something similar) currently exist? I really appreciate any guidance :) MG


title: Does Wordpress have to be released under the GPL?

text: WordPress uses MYSQL, which is released under GPL. So I think Workpress **MUST** be under GPL. But my friend said WordPress doesn't include MySQL program when it released, so it can be released under other license, and don't need to open source. Which is correct?


title: How to avoid duplicate Url for the home page

text: I am working on this web . I need to fiugure it out on how to avoid repeating the URL in the home Page. The Home page has actually two url creativesquaresummercamp.com/ creativesquaresummercamp.com/welcome-to-your-best-summer/ I want my Home page just having this url creativesquaresummercamp.com This is happening of course because this specific page has been selected page as Home Page. The permalink of this page obviously is: creativesquaresummercamp.com/welcome-to-your-best-summer/ How can i figure it out this issue? Thanks


title: mass delete posts based on metadata

text: I need to delete all posts that have a certain meta value for a certain meta key. I am looking for how to do this directly in the DB. So for instance, I have a meta field called "state", and I want to delete all posts (and there are thousands) whose meta value for that key is NOT equal to "CA". I have found queries that delete all posts of a certain type and all associated meta data, but can't find one that will let me delete posts BY metadata.


title: Exclude custom post type from list

text:
<?php          $custom_post_types = get_post_types(              array(                 '_builtin' => false,                 'public' => true             ),             'objects'          );              foreach ( $custom_post_types as $custom_post_type ) {             $custom_post_type->permalink = get_post_type_archive_link( $custom_post_type->label );         }              echo '
';         foreach ( $custom_post_types as $custom_post_type ) {             echo '
';             echo 'permalink . '">' . $custom_post_type->label . '';             echo '
';         }         echo '
';         ?>      I want to exclude products and sales CPT from the list. Can anyone help please? Also I want to display the list in ACS order.