title: Why isn't WMPL correctly redirecting users based on browser language?

text: Even though I have _'Browser language redirect'_ activated at WMPL's setup screen, users aren't being correctly redirected according to browser language. I currently have three languages selected: **en (default)** , **es** and **pt- br**. Only **es** users are automatically redirected to spanish page. **pt- br** users aren't, no matter what browser I use.


title: How to exclude Sticky from Recent Post?

text:
Im sorry about my english. I using below code to display recent post in my footer. The problem is, my recent post show sticky post. How to hide or remove sticky post from recent post??
          <?php $recent = new WP_Query("showposts=5"); while($recent->have_posts()) : $recent->the_post();?>

             <?php if (has_post_thumbnail()) { ?>             <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('img100'); ?>             <?php } else { ?>             <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/nophoto.png" />             <?php } ?>

                 <a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">                 <?php $tit = the_title('','',FALSE); echo substr($tit, 0, 46); if (strlen($tit) > 46) echo " [...]"; ?>

                 <?php the_time('M jS, Y') ?>

     <?php endwhile; ?>


title: Advanced Custom Fields: Post Object - Not returning data

text:
I have a custom post type called "Training" with an archive page (archive- training.php). I have another custom post type called "Courses". I am using Advanced Custom Fields: Post Object to link "Courses" posts to "Training" posts via a single select dropdown on the "Training" edit screen (ie. each "Training" post has one related "Courses" post). In the archive-training.php file I have the following loop:                   <?php while (have_posts()) : the_post(); ?>          <div <?php post_class('loop'); ?> id="post-<?php the_ID(); ?>" >

                 <a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__('Permalink to %s', 'purepress'), the_title_attribute('echo=0')); ?>" rel="bookmark">                     <?php the_title(); ?>                     <?php                         $post_object = get_field('post_object');                              if( $post_object ):                                   // override $post                             $post = $post_object;                             setup_postdata( $post );                                   ?>

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

                             <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>                     <?php endif; ?>

               <?php endwhile; // End the loop. Whew.  ?>      But only the "Training" post title is being output - the related "Courses" title/permalink is not. Any help would be much appreciated. Cheers guys.


title: Conditionally remove comments and post meta in functions.php

text: I'm new to Wordpress and am coming from the point and click world of Joomla! what was easy there now involves some solid php knowledge to replicate in Wordpress ;) I'm try to conditionally remove post-meta and comments from 3 categories using functions.php I'm using Woothemes Canvas and my own child theme. I can remove post-meta globally by using an empty function:               function woo_post_meta() {}      This works fine but I only want it to work for 3 categories I know I need to somehow use is_category butI'm not sure of the syntax, I tried               if ( is_category(4,5,6) ) {         function woo_post_meta() {}     }      but that doesn't work, i'm not sure how to correctly write a function within a function. Then how do i also remove comments from those categories? or should I make custom content type to do all this?


title: How to prevent a custom post type from using the archive.php template?

text: I have the following:               //Jobs     register_post_type( 'jobs',         array(             'labels' => array(                 'name' => __( 'Jobs' ),                 'singular_name' => __( 'Job' )             ),         'public' => true,             'show_ui' => true,         'has_archive' => false,             'hierarchical' => true,             'query_var' => true,             'supports' => array( 'title', 'editor', 'comments', 'trackbacks', 'revisions','author', 'excerpt', 'custom-fields', 'thumbnail', 'page-attribute' ),         'rewrite' => array('slug' => 'jobs', 'with_front' => true),             'taxonomies' => array( 'post_tag', 'category'),             'can_export' => true,         'show_in_nav_menus' => true,         //'capability_type'=>'jobs',         //'capabilities' => array(         //  'read_post' => 'read_jobs'         //),         )     );      I tried this: `'has_archive' => false,` But the Jobs custom post type is still using the `archive.php` template. Any ideas of what is wrong here?


title: comments are going to spam

text: Why all wordpress comments are going to spam? I didn't installed any plugins to protect blog from comment and trackback spam. Please help me to find a solution.


title: Trying to change image funtion from enlarge image to redirect to amazon website

text:
So im making an amazon affiliate website. the theme im using (ebuy) enlarges the image when you click on it. I'd rather just have the image take you strait to amazon. i went poking around in the single-goods.php template and found this:
     <?php     if ( has_post_thumbnail() ) { ?>         <a rel="prettyPhoto" href="<?php get_image_url(); ?> "  title="<?php the_title(); ?>" ><img class="boximg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&w=200&zc=1" alt=""/>     <?php } else { ?>         <img class="boximg" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" />     <?php } ?>
      Im new with code but im pretty sure this is telling the site to enlarge the image. how do i go about rewriting this to link them to the product in amazon's website. thanks :)


title: IF statement in a do_shortcode

text: Is it possible to do a if statement in a do_shortcode?               <?php          echo do_shortcode("[table width='500'] " .              if ( have_posts() ) :                  while ( have_posts() ) :                      the_post();                      the_content();                  endwhile;              endif; .          "[/table]");      ?>      It gives me an unexpected T_IF. EDIT: And without the IF statement it gives the post outside the shortcode.


title: Plugin that integrates Google Storage with WordPress?

text: W3 Total Cache and CDN Sync Tool (w/ WP Super Cache) are two plugins that do a pretty good job of integrating various Content Delivery Networks (CDN's) — including Amazon S3 / CloudFront, CloudFiles, and MaxCDN (among others) — with WordPress. But I am looking for a plugin (free or paid) that integrates Google Storage (not to be confused with Google Drive or others — see pricing) with WordPress, and so far, could find none. Has any come across a plugin that does this, by chance?


title: get_posts with meta_compare='LIKE' not working

text: I am using the following code:               $tolettpe = "Sale";//default     if($_REQUEST['tolettype']) $tolettpe = $_REQUEST['tolettype'];     else if($_REQUEST['srch_type']) $tolettpe = $_REQUEST['srch_type'];     $args = array(         'numberposts'  => $latestcount,         'category'     => $catidstr,       'meta_key'     => 'property_type',       'meta_compare' => 'LIKE',       'meta_value'   => $tolettpe.'%'      );     $post_content = get_posts($args);      The value in the database is 'Sale||' and there are no query string variables in the request. But the query returns no results. If I use the exact value and no meta_compare, it works. Any ideas how to make this work?


title: wp e-commerce - theme problem - why won't it load wpsc-single_product.php?

text: This is so frustrating! The theme i made myself works fine with wp-e-commerce (getshopped) plugin, but for some reason it won't load wpsc-single_product.php when i view a single product. When i change theme to twenty ten it works fine, so i'm positive that it has SOMETHING to do with my theme - But what? what do i eed to do in order to make my theme more compatible to wp-e-commerce? My own theme is based on the bones responsive framework. I'll appreciate any help, idea, clues - anything. Thanks!


title: Hide a subdirectory on my website hosting

text: I have a website www.mcruiseon.com. I have added .htaccess to get all www.mcruiseon.com to redirect to www.mcruiseon.com/wordpress. But the 'wordpress' still shows up on my html link on browser. Can I hide the fact that the website is hosted under a folder wordpress ?


title: autologin in wordpress when loged in non wp-site

text: Say I have a non-Wordpress website abc.com that has a Wordpress install at abc.com/news. How can I integrate my non-Wordpress login system at abc.com with the Wordpress installation at abc.com/news so that if a user logs into abc.com and then browses to abc.com/news he is already logged in at abc.com/news?


title: Post Meta not saving when have empty post

text: Hi I created a meta box on the post, page and project post types. The meta boxes save their data well on every post type. However I have a slight problem, when I create a new post and just enter a value in the meta box, then click 'save draft', the value in the meta box is not saved. On the pages and project post types the value would save. The behaviour is that if I don't enter anything in the title or the content of a new post, no metadata will be saved, and I also noticed that no permalink is generated, while for the other post types it is generated and the meta data is saved. Is this standard WordPress behaviour or do I have some bug in my code? Functionally wise I don't think it's a big problem, because we will of course always be entering a title and content within the posts, but I'm curious about this behaviour and would like to know if it's coming from my end or not. Thanks.


title: Yoast Force Rewrite Crashed Site

text: I just applied force rewrite in WordPress SEO by Yoast plugin and now cannot access my site at all am getting a Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error. message in Chrome and "Content Encoding Error The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression." in Firefox Please HELP!


title: Include template before a loop

text: This is my category / archive page i want to include a template before loop but i cant get posts based on category, it showing latest post only on every page. when i removed this line before the loop               <?php include( TEMPLATEPATH . '/includes/tb/hot_posts.tpl.php' ); ?>      it work smoothly, but i need this template before the loop this is code (archive / category )               <div class="Hot_post">          <?php include( TEMPLATEPATH . '/includes/tb/hot_posts.tpl.php' ); ?>          <?php if (have_posts()) : $count = 0; ?>      * * * and this is code from template (includes/tb/hot_posts.tpl.php)                <?php query_posts('meta_key=post_views_count&order=DESC'); ?>       <?php if ( have_posts() ) : while (   have_posts() ) : the_post(); ?>       please guide me


title: How to add a link(href) so when i click it, it renders (shows all) posts of custom post type (rich_media), from the current category?

text: I am trying to set up an image menu to show "all posts", "all videos" (custom post type: rich_media). I want to have an individual image for each post type, and by clicking it I want to show all posts in the current category of the chosen post type. All post_types share the common categories taxonomy. I managed to list all regular posts from current category by simply linking to current category, not sure how to do the trick with the custom post.


title: Guest author's post not display in author template

text: I am using this filter to display guest author on post, but i want guest author's posts to appear in the `author.php` template also. This is my guest author code (inside `functions.php`).               <?php     add_filter( 'the_author', 'guest_author_name' );     add_filter( 'get_the_author_display_name', 'guest_author_name' );     function guest_author_name( $name ) {         global $post;              $author = get_post_meta( $post->ID, 'guest-author', true );              if ( $author )             $name = $author;         return $name;     }     ?>      ...and here is the author template: http://codex.wordpress.org/Author_Templates#Sample_Template_File


title: adding a unique page to an existing site

text: i'm a wp newbie working with an existing site. i've been asked to add a unique page to the site and am having trouble finding out if this is possible. the current site would not change, but there would be a unique page sharing only the navigation menu of the site. not sure what to call it to research how to's any help appreciated. thank you


title: How can I get_post_meta() in the most efficient way?

text: I have a custom post type for a real estate site, and the theme displays 9 properties in a grid on the home page. I don't think its written terribly efficiently - I'm getting about 160 queries on the front page, and only about 20 of those queries are from plugins, so the theme needs some improvement. In the first place, it includes a file in the post loop - I'm not a PHP expert, but is including the same file repeatedly in the post loop really the best thing to do? The file that is included simply calls get_post_meta() for about a dozen or so variables for the custom post property listing (eg, number of bedrooms, etc). My first proposal is to move that section of code into the main file so its not "included" over and over. But more importantly, is there a better way to get the post meta than to call get_post_meta() a dozen times for a dozen variables - perhaps with a single query that gets all the meta at once, which I can assign to an array?


title: Upgrade Wordpress Database from 2.6 to 3.2

text: I'm trying to migrate an old wordpress site to a new host - the old installation hasn't been updated for a while and is still on 2.6.5 while the new install is 3.2.1 (current). Unfortunately the old front end is currently not working, so I can't use anything there. I'm wondering if there's a tool or way to update the existing 2.6.5 database to be compatible with 3.2.1 so that I can just load all of the existing data into the new system via a SQL query.


title: Add classes + taxonomy terms to wp_list_pages() output

text: I'm outputting a list of pages in my custom post type — a kind of tree — using `wp_list_pages()`. All's going well, except now I want to put some classes in the li's for styling. Even that's not going too bad with the help of this guy:               function tsep_page_css_class( $css_class, $page, $depth, $args, $current_page ) {       if ( !isset($args['post_type']) || !is_singular($args['post_type']) )         return $css_class;            global $post;       $current_page  = $post->ID;       $_current_page = $post;       _get_post_ancestors($_current_page);            if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) )         $css_class[] = 'current-page-ancestor';       if ( $page->ID == $current_page )         $css_class[] = "current-page-item";         elseif ( $_current_page && $page->ID == $_current_page->post_parent )         $css_class[] = 'current-page-parent';            return $css_class;     }     add_filter( 'page_css_class', 'tsep_page_css_class', 10, 5 );      This basically prints out `current-page-item`, `ancestor` or `parent` in my `<li>`. This part works really well. What I want however, is to print out taxonomy terms from my "content-type" taxonomy in the `<li>` classes too. So, one might look like this: ` I've got a start on it:               $terms = get_the_terms( $post->ID, 'content-type' );                  if ( $terms && ! is_wp_error( $terms ) ) :                       $content_type = array();                      foreach ( $terms as $term ) {                     $content_type[] = $term->name;                 }                      $the_content_type = join( ", ", $the_content_type );                  endif;      But in the end, `$the_content_type` doesn't seem to return anything. How can I get `$the_content_type` to return a value, and how would I put that value in the `$css_class[]` above? Hope some of this made sense! Thanks.


title: Custom Post Type Archive Template

text: I have similar problem to this one: Custom Post Type Template - Archive I have a WordPress custom post type called `coupon`. I try to assign the template to it by using `archive-coupon.php`, but it goes directly to `home.php`. I also have a custom taxonomy of this CPT called `tags` with the `rewrite rule => "tag"` so when I go to a URL like this - `http://mysite.com/tag/3d` I want to see a custom template for my Custom Post Type or general for taxonomies. I have also tried `taxonomy.php` template but it still ignores it. What could be the problem? ### Update - I don't know what really happened. But before that I had template called taxonomy-store.php. So, when I renamed it to another name, taxonomy `tag` started using `taxonomy.php` template file. And still `archive-coupon.php` doesn't work.


title: Wordpress plugin WP-blocks is adding slashes before apostrophe

text: **Edit: Problem Solved, solution posted at bottom** I'm going crazy trying to figure out why this is happening. This is well known issue, and I've done everything recommended so far. I'm using php version 5.3 and magic quotes are off. This issue only occurs when using the plugin wp_blocks, so I'm assuming there is something in the code that is making this happen. Any ideas? I'm currently sifting through the plugin to see if there is anything that would force this behavior. Of note is that if I insert the html entity ''' and then save and go back into the html (I use ultimate tinyMCE, which has a nice highlighted syntax editor, but this also occured before isntalling that plugin), it will replace all of ''' with apostrophes. **Solution** The plugin used only a wordpress function called wp_kses_stripslashes, which only works on double quotes apparently. I simply further processed the passed data through stripslashes and voila.


title: Validate an option array

text: We use the default WordPress `register_setting()` function to validate theme options. This call, for example:               register_setting( 'options-group', 'option1', 'intval' );      Will validate whether or not `$option1` is an integer. What can I use to pass an array of options to validate each member of the array? For example:               $options = array(         'options1' => 4,              // intval         'options2' => '127.0.0.1',    // IP address         'options3' => 'test@test.com' // Email address     );


title: Best way to enable sorting by 3 criteria on a page of listings

text: If you go to this site: http://www.ec-ohio.com and click on one of the links in the Directory (left column of homepage) you generate a page with listings, and at the top of each page there's 3 links that let you sort the page content by city, county or product. I want to rebuild the site in WP, but am wondering how to enable that kind of sorting. I was going to enter the listings via custom post types. Any advice greatly appreciated!


title: Advanced custom fields plugin limit number of fields in the group to 64

text: I have a problem when creating more than 64 fields in the fields group using plugin "Advanced custom fields". I've already found out that problem is in saving of new fields not in loading from database, because when I put new field directly to database it is loaded and shown in plugin (in the list of fields). I was trying to find source of the problem and found out that fields are send in $_POST["fields"] array. But when they are processed by plugin method the $_POST["fields"] variable has only 64 fields in it (I tried count($_POST["fields"])) even if there is more fields in the form. So I think that this array is cut to size of 64 somewhere in wordpress probably. I tried this                   add_filter( 'postmeta_form_limit' , 'customfield_limit_increase' );         function customfield_limit_increase( $limit ) {             $limit = 100;             return $limit;         }      but it didn't work. Any suggestions please?


title: WordPress 3.4 Permalinks Redirection Problem

text: A few years ago this was the permalink structure I had for my blog: /%year%/%category%/%postname%.html I changed these permalinks last year to this: /%category%/%postname%/%post_id%/ A plugin that goes by the name Permalinks Redirect was used, and it worked pretty well to permanently redirect older URLs to newer ones. However, after a recent WordPress update to 3.4.1 version, I noticed the older permalinks are no longer redirecting. The problem is not with the plugin -- I have spent 2 days dabbling with every redirect plugin I could find. After a bit of Googling, I figured out the problem is with WordPress 3.4, and a bug has been already submitted. Link: http://wordpress.org/support/topic/changing-permalinks-not-redirect-the- old-to-the-new#post-2913004 All the older URLs are throwing out 404 errors, which is frustrating. I'd really appreciate if there's a HTACCESS redirect code, or MOD_REWRITE code (the site is using nginx, if that helps) that could be posted here. I have very little knowledge about redirection. Thanks a ton!


title: Define width of featured image thumbnails, but also make responsive?

text: So I know how to define thumbnail images with set_post_thumbnail_size and it works, but the issue is that the image isn't responsive when I do that, right? When I define the thumbnail to be 300 x 9999, I'm telling the image to always be 300 pixels wide, but I need that image to expand or constrict with it's responsive container. When viewing my project on a desktop, the image containers are floated up next to each other, and need to be around 300 pixels wide. When you view the site on smaller and mobile widths, the image and it's container can actually expand up to 700 pixels because they are no longer floated next to each other, but are stacked up with no floats. I do have max- width:100%; for images in my css by the way. Is there anything I can do? I was going to use this method: http://mobile.smashingmagazine.com/2012/06/14/responsive-images-with-wordress- featured-images/ but still, aren't we just defining image widths that aren't going to be responsive? Plus, just using is_mobile to detect probably isn't perfectly reliable. If I shrink my site down to 700 pixels, it's not necessarily a mobile device, but I will need a different image served up. Ugh


title: How can we customize the logo and some text on the welcome screen?

text: I have found discussions and solutions on hiding or removing the lately introduced **Welcome screen**. But we DO find the screen, as a whole, very useful and an excellent addition. So, what we are looking for is quite different. * * * We just want to **change parts of it on a multisite/subfolders network**. To be exact. The wp logo image (wp-badge.png) on the left, as well as the header next to it (.welcome-panel-content .about-description, .welcome-panel h3) and the text under it included in (.about-text, .about-description, .about-wrap li.wp-person a.web). ![Proposed Welcome Panel](http://dl.dropbox.com/u/70811202/welcome_02.png) I am aware that most of it is hardcoded. Still.... There must be a way. :) PS: 1) We already use a plugin that can add css on the admin screens. But I don't think it would solve anything. 2) If there is a way, please be as specific/descriptive as possible. My coding skills suck. :( ## Update After following brasofilo's instructions I have compiled the code to a mu- plugin. I placed it in our mu-plugins folder, have tested it on our test- multisite and works like a charm. :) I have it uploaded to my dropbox so anyone can benefit. Feel free to Right Click Here, download it and customize it to your needs. I hope it helps others as well. PS: @brasofilo Please let me know whether I have credited it correctly.


title: How to tell if a user has gone in and created a menu

text: By default if a user has not created say a footer or a top level menu then WordPress, in the case of the footer, will use default content like pages and so on to "create" a menu. I don't want this to happen. I want to do something like:               if user has not set a menu for footer        display a message telling them they should.     else        display said menu.     end      How would I do this?


title: Multiple Block Quotes without using HTML

text: First of all, I have a client that has no HTML knowledge. He wants his all his posts to have a certain format where within the post body, he can add multiple pull quotes with different styles. Note that all the posts would have the same structure. Any suggestions on how to go about this? Custom post style? Custom button on TinyMCE? Anyhelp would be appreciated


title: Load jquery only for certain pages in the backend

text: I have a set of custom theme settings in my functions.php file. **In order to arrange some things I want to load jquery ONLY to my functions.php file.** What I read in wordpress is this: If it was needed within the admin, you could use the admin_enqueue_scripts action instead, **however this enqueues it on ALL admin pages, which often leads to plugin/core conflicts** , ultimately breaking the WordPress admin experience. Instead, You should only load it on the individual pages you need it, See the Load scripts only on Plugin pages section for an example of that. This is the wordpress recommended script for enabling jquery only on plugin pages. **Can I adapt this script to enable my script just for the theme options page?**               <?php         add_action( 'admin_init', 'my_plugin_admin_init' );         add_action( 'admin_menu', 'my_plugin_admin_menu' );              function my_plugin_admin_init() {             /* Register our script. */             wp_register_script( 'my-plugin-script', plugins_url('/script.js', __FILE__) );         }              function my_plugin_admin_menu() {             /* Register our plugin page */             $page = add_submenu_page( 'edit.php', // The parent page of this menu                                       __( 'My Plugin', 'myPlugin' ), // The Menu Title                                       __( 'My Plugin', 'myPlugin' ), // The Page title                       'manage_options', // The capability required for access to this item                       'my_plugin-options', // the slug to use for the page in the URL                                       'my_plugin_manage_menu' // The function to call to render the page                                    );                  /* Using registered $page handle to hook script load */             add_action('admin_print_styles-' . $page, 'my_plugin_admin_styles');         }              function my_plugin_admin_styles() {             /*              * It will be called only on your plugin admin page, enqueue our script here              */             wp_enqueue_script( 'my-plugin-script' );         }              function my_plugin_manage_menu() {             /* Output our admin page */         }     ?>      Thank you!


title: Keeping LaTeX contents in line with non-latex text

text: I am using LaTex from the JetPack plugin, which is similar but not identical to TeX for maths, for my WordPress blog where I post course work. How do I get the generated formulae to centre on the line so the equals sign lines up with the normal text that I have typed? to see what I mean please check this blog entry. here are a the two offending pieces of LaTeX for the last two equations of the equations:               $latex = \large{\dfrac{1}{62,000}} $      and               \left(\large{\dfrac{10,000}{62,000,000}}\right) 100\% $      thanks for your time :)


title: How to hide all child pages with post_query?

text: i have a page template as start page(home.php). i use a 2 columns grid to display all pages on that home.php with title and excerpt. unfortunately also my child pages are shown and i can't figure out how to hide them. I am not trying to make a list menue or something, its more like a gallery of my pages. for now i use "query_posts('post_type=page' .$parent);" with the mentioned result. i tried to use an array as well, but this will give me posts instead of pages (fr reasons i havnt understood yet). What am i missing to hide all child pages and only display the parent pages? Any help? Thanks in advance! Dan


title: Wordpress Hide Widget If $_Session Is Active?

text: I was wondering if there is an easy solution to add some php "if" code when my website tries to show the widgets and if it has $_SESSION I set on homepage (based on the source of which they came) not to show one of them?


title: set custom value on default admin columns based on row values

text: I added some foreign key to wp_comments db table. Some comments could be indipendent from post. For these comments I've comment_post_ID set to 0. So i need something like:               add_filter("manage_comments_default_column","myplugin_my_filter", 10, 2);          function myplugin_my_filter($default, $comment_ID){          if($default == "response"){              //and if comment with id=$comment_ID isn't related to a post              echo "";          }     }      Does exist some similar hook? ---Edit--- Temporary solved using:               /*     unlink 'response' column and  add a 'response'      substitute column called 'article'     */     add_filter("manage_edit-comments_columns", "myplugin_manage-columns");          /*       if comment has a post related show a link to        that post in 'article' field        else leave 'article' field empty     */     add_filter("manage_comments_custom_column","myplugin_manage-content-columns", 10, 2);      But I hope for a better solution. * * *


title: Default permalink structure causing Notice: Undefined property: WP_Query::$post

text: I use the wp for membership site. I use pages for the user log in, manage post, edit profile and etc. When I apply the default permalink structure, I found that the debug mode show this notice on every pages (not post page).               Notice: Undefined property: WP_Query::$post in /var/www/example/wp-includes/query.php on line 2986 Notice: Trying to get property of non-object in /var/www/example/wp-includes/query.php on line 3349       But when I use the post name for the permalink structure, this notice disappeared. Though it seems is not a serious issue (is it?), but I'd to know what causing this warning? Thanks


title: Sort results by groups of numbers and letters

text:
I have this code:               <?php     $letter=' ';      query_posts( array (  'orderby' => 'title', 'order' => 'ASC' ) );     if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
         <?php          $title=get_the_title();          $initial=strtoupper(substr($title,0,1));         if($initial!=$letter)           {           echo "

$initial :

";           $letter=$initial;           }         echo '
'.$title.'
';         ?>
     <?php endwhile; endif; wp_reset_query(); ?>      I show the results by groups, in this way:               **&**     'title     "othertitle          **1**     1555555555     1666666666          **2**     2111111111     2555555555          **A**     abbbbbbbbb     annnnnnnnn          **B**     blllllllll     bhhhhhhhhh      But I want a group in this way:               **0>9**     1555555555     1666666666     2111111111     2555555555          **A**     abbbbbbbbb     annnnnnnnn          **B**     blllllllll     bhhhhhhhhh          **O**     othertitle          **T**     title      So I'd like to show:   * results grouped in letters (A>Z) in different group (ex: group A, group B, group C,...)   * results grouped in numbers (0>9) in the same group   * delete the first character from the title with the initial apostrophe (') or quote ("). How can I resolve please?


title: WP Business Directory Manager Plugin Admin Listings?

text: I'm using the WP Business Directory Manager plugin and I'm having some problems. I've been meaning, as an admin, to add a Listing to my directory, but it shows pended, so i look a round the plugin a found a way to change it in the backoffice but it published every listings. Is there a way to have only the admin that his listings get published by default?   In the `listing.php`:                if ( !$data->listing_id && ( !$listing_cost || current_user_can( 'administrator' ) ) ) {              wp_update_post( array( 'ID' => $listing_id, 'post_status' => wpbdp_get_option( 'new- post-status' ) ) );      }      the setting of the `new-post-status`:               $this->add_setting($s, 'new-post-status', _x('Default new post status', 'admin settings', 'WPBDM'), 'choice', 'pending', '',                            array('choices' => array('publish', 'pending'))                            );      Much appreciated.


title: Customize Option Framework

text: I was trying to create a Option Theme Page for my theme and I wasn't able.   Today I found the Option Theme Framework but after some time I really can't understand how to use it.   In particular, I'm able to create a new "field" but I cant'use it.   For example, I would create a field to le the user to change the color of a specific class/tag. Has anyone an idea of how to do that?   I can't find any docs EDIT: I'm able to use the stuff like variables and something else in a normal php page, but I can't use that to change my CSS.


title: Is this plugin safe to run?

text: This is an extract of code from a wordpress plugin. Is it safe to run despite the variables not being filtered? Also does the wpdb class filter to prevent any injection?               list($email_id, $user_id, $url, $anchor) = explode(';', base64_decode($_GET['r']), 4);     $wpdb->insert(NEWSLETTER_STATS_TABLE,         array(             'email_id' => $email_id,             'user_id' => $user_id,             'url' => $url,             'anchor' => $anchor         )     );


title: How can I get an <h2> tag to wrap each ancestor that gets outputted in this condition?

text: I found this snippet in a different thread and it mostly does what I need, but I'm having trouble wrapping the individual pages this outputs with tags. All I can seem to add is a line break. I don't have a lot of experience with php so unfortunately I wasn't able to customize it to my needs. In the end I just need the firsts and second level page titles to be displayed and they need to be wrapped in individual h2's. Thanks in advance.                   //This is the loop that pulls banner titles     function print_page_parents($reverse = true){         global $post;              //create array of pages (i.e. current, parent, grandparent)         $page = array($post->ID);         $page_ancestors = get_ancestors($post->ID, 'page');         $pages = array_merge($page, $page_ancestors);              if($reverse) {             //reverse array (i.e. grandparent, parent, current)             $pages = array_reverse($pages);         }              for($i=0; $i<count($pages); $i++) {             $ban_titles.= get_the_title($pages[$i]);             if($i != count($pages) - 1){                 $ban_titles.= " <br /> ";             }         }              echo $ban_titles;     }


title: colorbox not loading in <head>

text: I can not get colorbox fully loaded. I am trying to add color box to use in my plugin admin. I do not need it for the front end. I can get the css but can not get jquery.colorbox-min.js or the inline script to load in the `<head>`. Here is what I have:               /*--------------------------------------------------------------------*/     /*    admin Stylesheet     /*--------------------------------------------------------------------*/     add_action( 'admin_enqueue_scripts', 'add_wlmm_admin_stylesheets' );          function add_wlmm_admin_stylesheets() {         if (is_admin()) {                  /*              * Includes css for:              *              *  - plugin optins framework              *  - colorbox             */           wp_enqueue_style( 'wlmm-admin-style', WLMM_URL . 'admin/css/wlmm-admin-styles.css' );       }     }               /*--------------------------------------------------------------------*/     /*      load colorbox for admin help images     /*--------------------------------------------------------------------*/          add_action( 'wp_enqueue_scripts', 'wlmm_do_colorbox_js' );     add_action( 'wp_head', 'wlmm_do_colorbox_script' );          function wlmm_do_colorbox_js() {              if (is_admin()) {           wp_enqueue_script( 'colorbox', WLMM_URL . 'admin/scripts/colorbox/jquery.colorbox-min.js', array( 'jquery' ) );       }     }          function wlmm_do_colorbox_script() {          if ( ! defined( 'COLORBOX_WIDTH' ) ) define( 'COLORBOX_WIDTH', '95' );     if ( ! defined( 'COLORBOX_HEIGHT' ) ) define( 'COLORBOX_HEIGHT', '95' );     if ( ! defined( 'COLORBOX_OPACITY' ) ) define( 'COLORBOX_OPACITY', '0.6' );          // Colorbox settings     echo '     <script>       jQuery(document).ready(function () {           jQuery("a.admin").colorbox({ width:'.COLORBOX_WIDTH.', height:'.COLORBOX_HEIGHT.', opacity:'.COLORBOX_OPACITY.' });       });     </script>     ';     }


title: Show admin help message across custom post type parent and child posts

text:
In my custom plugin, I am using the following code to display an info / help box. This is working great for the main admin edit screen that lists the custom posts, but how can I extend this to show the message at the top of each of the actual child custom posts too.               function my_admin_notice(){     global $pagenow;     if ($_GET['post_type'] == 'my_custom_post_type' ) {      echo '

Help

some help text

';     }     }     add_action('admin_notices', 'my_admin_notice');


title: Custom rewrite rules for /pastissues/%category%-%postname%.html

text: I have been researching this for over a week now. I've tried a few tutorials on custom rewrite rules and custom post types, but I'm still not sure which direction I should go in for making this happen. And it absolutely has to happen. This is a large client who needs to retain the same link structure that is coming from a moveable type envrionment: WP ---> http://www.domain.com/pastissues/category/here-is-the-postname.html - works on wordpress MT ---> http://www.domain.com/pastissues/multiple-word-category-orsingle-one- here-is-the-postname.html - works on Moveable Type I've tried: /pastissues/%category%-%postname%.html --> this produces the right looking link, but fails when I request an article if the article has a category that is more than one word. So I probably need to write a custom permalink plugin. I've tried looking through available plugins out there, but custom permalinks won't help me, because I'm a multi-site install.


title: Adding thumbnails for non-image attachments

text: I'm working on a site that provides Photoshop resources. I would like to create a page offering brushes for download that displays a thumbnail image and a link to a .zip file for each brush set. I was thinking that I could attach the .zip files for all the brush sets to the page and then display the thumbnails. I was wondering if there might be a way to link a thumbnail image to the attachment and then display all of the thumbnails. My initial thought was to add a custom field for attachments that allowed you to upload a thumbnail. Then, use something like this, but modified to output the thumbnail with a link to the attachment itself [ List Post Attachments - Remove Image Thumbnails ] to display all of the previews. Is there an existing plugin that allows you to upload thumbnails as a custom field to attachments, or can you tell me how to do so myself? (Or, if there's a better way to do this, I am all ears!) Thank you!


title: Customizing Only a Specific Menu using the "wp_nav_menu_items" Hook?

text:
Thanks to some help on here, I've managed to add a custom search box to my main menu... by adding this to my theme's functions.php               add_filter('wp_nav_menu_items','search_box_function');       function search_box_function ($nav){       return $nav."
<form action='http://example.com/' id='searchform' method='get'><input type='text' name='s' id='s' placeholder='Search'></form>
";     }      However, I've now added another menu to put in the footer, but the search box gets added to this one too. How would I add the search box to the primary menu only? My code for registering the menus is:               register_nav_menus( array(       'primary' => __( 'Primary Navigation', 'twentyten' ),       'secondary'=>__('Secondary Menu', 'twentyten' ),           ) );      ..and the code to display the secondary menu is:               wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'secondary' ) );


title: Adding Visibility Options

text: I've searched for plugins but while some do halfway accomplish the task they are normally very complicated. I'd like to add option to the visibility menu when creating a page (and post, but page is more urgent). ![visibility menu wordpress](http://i.stack.imgur.com/ZRqGY.png) These options need to be: _"Only visible to logged user"_ and _"Only visible to guest (i.e. not logged in"_ Does any one know of plugin or and point me in the right direction to write my own? **EDIT:** A use case for this is; only show the registration and login pages to 'guests'. A logged-in user doesn't need to see these pages.


title: Multiple images with Media Uploader on front-end

text: I'm trying to implement a **multiple** image upload on a frontend form, using the built-in Wordpress Media Uploader. I managed to have a single image upload, but I can't find out how to have **multiple** image fields. I'm very new to jQuery, unfortunately. Whenever I use multiple `<input>` fields, the `Upload Image` Button only works on the first one. Help is greatly appreciated. This is my working code for the single image upload, which I try to adjust to allow multiple `<input>` fields/ image uploads. **html frontend form**               <label for="upload_image">         <input id="upload_image" type="text" size="36" name="ad_image" value="http://" />          <input id="upload_image_button" class="button" type="button" value="Upload Image" />         <br />Enter a URL or upload an image     </label>      **media-uploader.js**               jQuery(document).ready(function($){              var custom_uploader;              $('#upload_image_button').click(function(e) {                  e.preventDefault();                  //If the uploader object has already been created, reopen the dialog             if (custom_uploader) {                 custom_uploader.open();                 return;             }                  //Extend the wp.media object             custom_uploader = wp.media.frames.file_frame = wp.media({                 title: 'Choose Image',                 button: {                     text: 'Choose Image'                 },                 multiple: false             });                  //When a file is selected, grab the URL and set it as the text field's value             custom_uploader.on('select', function() {                 attachment = custom_uploader.state().get('selection').first().toJSON();                 $('#upload_image').val(attachment.url);             });                  //Open the uploader dialog             custom_uploader.open();              });               });      **in functions.php**               add_action('wp_enqueue_scripts', 'media_uploader_script');     function media_uploader_script() {         if (is_page_template('page-item-submission.php')) {             wp_enqueue_media();             wp_register_script('media-uploader-js', get_template_directory_uri().'/assets/js/media-uploader.js', array('jquery'));             wp_enqueue_script('media-uploader-js');         }     }      Here's a screenshot of what I'm trying to implement (I know that the "Add More" Button is another kind of 'issue').![enter image description here](http://i.stack.imgur.com/kdQ93.png) EDIT: This is how far I got with Steven Jones help: **media-upload.js**               jQuery(document).ready(function($){              var custom_uploader;              $('.upload_image_button').click(function(e) {               var target_input = $(this).attr('id');                  e.preventDefault();                       //If the uploader object has already been created, reopen the dialog             if (custom_uploader) {                 custom_uploader.open();                 return;             }                  //Extend the wp.media object             custom_uploader = wp.media.frames.file_frame = wp.media({                 title: 'Choose Image',                 button: {                     text: 'Choose Image'                 },                 multiple: false             });                  //When a file is selected, grab the URL and set it as the text field's value         custom_uploader.on('select', function() {         attachment = custom_uploader.state().get('selection').first().toJSON();         $('input[name=' + target_input + ']').val(attachment.url);     });                  //Open the uploader dialog             custom_uploader.open();              });               });      **html frontend form**               <input type="text" size="36" name="image_1" value="http://" />      <input id="image_1" class="upload_image_button" type="button" value="Upload Image" />          <input type="text" size="36" name="image_2" value="http://" />      <input id="image_2" class="upload_image_button" type="button" value="Upload Image" />      However, only one of the two field gets populated with input I choose from the media uploader. Example: I click on the second button (image_2) first, an URL gets populated into that field. Afterwards I click on the first button (image_1): the attachment URL now gets populated into the second field, although it must go into the first field... this doesn't make sense.


title: Change url of page according to my reqirements in wordpress

text: I am facing problem with change permalink actually I am using Redirection plugin you can see this plugin from here.                  http://wordpress.org/extend/plugins/redirection/      I have installed this plugin and activate.After that I want to change the url of page having page id 5 .Url is provided for each page by client so I need this                 for example:page_id=5 is about us page and I want to change this as shown in target URL            Source URL:http://www.lifecellskin.us/Dev/?page_id=5       Target URL:http://www.lifecellskin.us/Dev/About.php        After that I clicked Add Redirection But when I click About us tab from header navigation it navigate to `About.php` but show this message give below. You have entered the wrong url/ page name. Click here for continueCLICK HERE Please help me its very urgent.Please provide me any help regard this how this plugin will work in right way as I want Thanks


I am using wordpress mu. My blog administrators are unable to edit users - getting the message: You do not have permission to edit this user. I have checked my plugins etc and cannot find the cause. Is there a solution to this problem?


title: Has anyone been able to get the aweber plugin to work

text: Aweber has a new api https://labs.aweber.com/ and based on that they have written a plugin: http://wordpress.org/extend/plugins/aweber-web-form-widget/ for WordPress that adds a widget. In my testing ( latest WordPress, default theme, PHP version 5 ) I have not been able to get this plugin to work. I et through authentication ok, but am unable to pull anything through the API to make the widget work. Can anyone else verify whether or not the plugin is working for them. Also, has anyone else built anything that works with the API yet?


title: How do I add Post Like and Bookmark Functionality to my WordPress Site?

text: on a wordpress site, I'd like visitors to be able to "like" or "save" posts, so that they have a personalized page with all the posts they liked. how could that be achieved? thanks


title: Template files for Custom Post Type and Taxonomy

text: I've got a custom post type called "properties" and two custom taxonomies called "type" (office space, retail space, etc.) and "location" (new york, chicago, etc.). I have created "archive-properties.php" which works beautifully when I go to "mysite.com/properties." And I have "single-properties.php" which works great when I go to "mysite.com/properties/my-single-post." I've created some dynamic Type and Location navigation menus that populate with all available "types" and "locations" from the taxonomy. And I have a "taxonomy-properties.php" template file. Unfortunately, both "mysite.com/office-space" and "mysite.com/properties/office-space" yield a 404. Same with any of the cities. I've already tried the Permalinks trick, but it didn't work. And I've already looked at other questions on this topic and gotten no where. What file do I need to create to make this work, and where does it need to go? Am I expecting too much? Is Wordpress not really set up to work this way? If not, what is the best way to show an "archive" page for my custom taxonomies? Difficulty: The "type" taxonomy is unlikely to change, since the client only handles office space and retail space. But cities are always being added to the "location" taxonomy, so I can't just create a template file for every city. UPDATE: Adding the code I used to create the custom post type and taxonomies.               function create_post_type_properties() {         $labels = array(             'name'                  => __('Properties', 'properties'),             'singular_name'         => __('Property', 'properties'),             'add_new'               => __('Add New', 'properties'),             'add_new_item'          => __('Add New Property', 'properties'),             'edit'                  => __('Edit', 'properties'),             'edit_item'             => __('Edit Property', 'properties'),             'new_item'              => __('New Property', 'properties'),             'view'                  => __('View Property', 'properties'),             'view_item'             => __('View Property', 'properties'),             'search_items'          => __('Search Properties', 'properties'),             'not_found'             => __('No Properties found', 'properties'),             'not_found_in_trash'    => __('No Properties found in Trash', 'properties'),             'parent_item_colon'     => '',             'menu_name'             => 'Properties'         );              $args = array(             'labels'        => $labels,             'description'   => 'Properties & property specific data',             'public'        => true,             'menu_position' => 5,             'supports'      => array('title', 'editor', 'thumbnail', 'custom-fields'),             'taxonomies'    => array(''),             'has_archive'   => true,             'can_export'    => true,             'menu_icon'     => plugins_url( 'image.png', __FILE__ ),         );              register_post_type( 'properties', $args );     }          /* Create custom taxonomy (type) for properties */     function property_type_taxonomy() {         $labels = array(             'name'              => _x( 'Property Types', 'taxonomy general name' ),             'singular_name'     => _x( 'Property Type', 'taxonomy singular name' ),             'search_items'      => __( 'Search Property Types' ),             'all_items'         => __( 'All Property Types' ),             'parent_item'       => __( 'Parent Property Type' ),             'parent_item_colon' => __( 'Parent Property Type:' ),             'edit_item'         => __( 'Edit Property Type' ),              'update_item'       => __( 'Update Property Type' ),             'add_new_item'      => __( 'Add New Property Type' ),             'new_item_name'     => __( 'New Property Type' ),             'menu_name'         => __( 'Property Types' ),         );              $args = array(             'labels'        => $labels,             'show_ui'       => true,             'show_tagcloud' => false,             'hierarchical'  => true         );              register_taxonomy( 'property_type', 'properties', $args );     }          /* Create custom taxonomy (location) for properties */     function property_location_taxonomy() {         $labels = array(             'name'              => _x( 'Property Locations', 'taxonomy general name' ),             'singular_name'     => _x( 'Property Location', 'taxonomy singular name' ),             'search_items'      => __( 'Search Property Locations' ),             'all_items'         => __( 'All Property Locations' ),             'parent_item'       => __( 'Parent Property Location' ),             'parent_item_colon' => __( 'Parent Property Location:' ),             'edit_item'         => __( 'Edit Property Location' ),              'update_item'       => __( 'Update Property Location' ),             'add_new_item'      => __( 'Add New Property Location' ),             'new_item_name'     => __( 'New Property Location' ),             'menu_name'         => __( 'Property Locations' ),         );              $args = array(             'labels'        => $labels,             'show_ui'       => true,             'show_tagcloud' => false,             'hierarchical'  => true         );              register_taxonomy( 'property_location', 'properties', $args );     }


title: Turning broken link into search term?

text: I'm migrating a Typepad subdirectory install to a Wordpress subdomain install, and most of the links will be broken. The rewrites work so that;               http://mainsite.com/blogs          is rewritten to          http://blogs.mainsite.com      If a full link with article information is passed, it is rewritten as such;               http://mainsite.com/blogs/2014-13-7/article-title.html          to          http://blogs.mainsite.com/2014-13-7/article-title.html      What I'm looking for is a plugin that will feed that article title into Wordpress's search so even though the link is broken, it is easy for users with bookmarks to get to.


title: Can't call external stylesheet for Wordpress admin (using wp_admin_css)?

text: I tried the following:               <?php          function my_wp_admin_css() {       echo '<link rel="stylesheet" href="/wp-content/plugins/custom-admin-style/wp-admin.css" type="text/css" />';     }          add_action('wp_admin_css','my_wp_admin_css');      but nothing is being displayed in the Wordpress admin. What I'm doing wrong?


title: Qtranslate displays empty categories with get_categories()

text: I am using qtranslate (Wordpress Plugin) on a website and I don't want to display categories that don't contain posts for a language. So when I do `get_categories()` (without qtranslate) the categories that have no posts are hidden. But when they have posts in one language and not the other they are displayed in both languages. I know this is a plugin related. Any ideas/solutions much appreciated.


title: Where can I find a good reviewed collection of Twenty Ten child themes?

text: I am looking to extend the functionality and more importantly improve the design with post thumbnails on main page, beautify post metadata, etc. If you know a good child theme for twenty ten, please share. Thanks.


title: Syncing BuddyPress and WordPress profile fields

text: BuddyPress and WordPress store profile information in 2 separate locations, and there's a process to sync profile data between the 2 tables. However, this is pretty much limited (from how I'm reading the code) to a single name field. What's the best way of adding other profile fields to this sync process (I'm particularly thinking of the description, and various contact fields) - looks like I'll need to create a function to hook into `xprofile_updated_profile` and `user_profile_update_errors` - is this right? Is there an elegant way of establishing the mapping between WP `usermeta` and BP `xprofile_data`, or do I have to create the records representing profile fields in `xprofile_fields` manually?


title: Custom Import with taxonomies

text: I'm looking to do a custom import from a custom cms to wordpress. Looking at the export/import files in wordpress, I can get match most of the structure. Though, it is missing the relationships for custom taxonomies and posts when exporting/importing. Is there a fix for this or would it be easier to not use wordpress's import script? Rather, write custom SQL to handle it all. Also, as I am developing this new site the content in the old site (custom cms) is still being updated. There will be a freeze a few days before launch, where I can do another db dump and reimport. Though, the issue I'm foreseeing is that I will need to delete all posts and relationships and reimport the content. Is there an easy way to delete all posts and relationships to prevent any duplicates and reimport the content?


title: Add #content to next_image_link()

text: I am almost completely happy with a new site I built - see http://www.fatasbutter.com.au/gallery/the-music/attachment/019/ As a final touch, I want to add `#content` to the end of the link location for each `previous_image_link()` and `next_image_link()`. Any ideas on how to do this?


title: how can i display share images for each article?

text: if you take a look at Technibility you will see share icons for each post. It doesnt seem to be a plugin. But if its custom how is it grabbing the share count?


title: Does WordPress Need BuddyPress to Handle Large Amounts of Users?

text: I understand that technically there can be 18446744073709551615 users (db limitations). But I heard at a talk that the vanilla install of WP in actuality can't handle many users that well due to caching issues, especially if you add user_meta. Can someone confirm this? The speaker recommended that to make wordpress more able to handle the large amounts of users it's a good idea to install BuddyPress, but honestly the code is a mess and there is little documentation. So I'm considering scrapping that and going vanilla again. Does anyone have any expertise and can shed light on this?


title: How to optimize my query filtering out unwanted data?

text: I use `get_posts ($arg);` to query the post table. Usually I need only three fields: post_title, ID and post_excerpt. But the data returned are many more, including post_content that is usually huge. I know I can use `'fields' => 'ids'` to get only the ID. But I would like to use `'fields' => 'post_title'` or `'fields' => 'post_excerpt'`. Is that possibile? If not possibile, which other method I could use?


title: Can I use a custom post type as a custom taxonomy for a different custom post type?

text: I am working on a site and need some guidance on how to proceed. The site allows registration of (1) artists, (2) promotion teams, and (3) members. The site hosts talent expos in which artists registered are assigned a promotion team and posts an .mp3. The promo teams recruits voters and organizes concerts etc for their artist to encourage voting. Users vote daily on their favorite .mp3 in a "faceoff competition." If I create a custom post type of "competing_artist," a registered artist could register for an expo and upload their .mp3. I could assign the 10 selected competing artists ( and their corresponding promo team ( as another custom post type ) to the expo "post" to relate the three. I think this would allow me to display an expo that would have all the competing artists, be able to add information about the expo (like location, etc), and enable me to equip the staff with easy gui to select the necessary components of the expo. Is this the WordPress way or is there another and better way???


title: Removing custom post type name in single article URLs

text: My articles are not standard posts but custom post types (not sure about how to formulate this exactly). When viewing an article in single view, the URL is : my_site.com/custom_type_name/article_title, whereas I want: my_site.com/article_title, just like with normal posts. How to achieve that ?


title: How do I separate author avatars and comments in 3.4.2?

text: I see plenty of tutorials for much older versions of WP online, but cannot find one for 3.4.2 to separate comment content and the author's avatar/gravatar. I'm seeking a code that separates the actual comments content from the gravatar **and does so in the simplest way possible** , I'd rather not update comments.php every time there's an update to the WP core. Is there a simple way to do this with wp_list_comments? I'm doing this for design purposes. This is how I currently call avatars:               <?php wp_list_comments('avatar_size=60'); ?>


title: How to limit post content and remove image caption from it

text: I am using this function to limit the content in my themes. But the problem is whenever I call the function, it also displays the image caption. I want to remove the image caption when calling the_content_limit function. Here is the code:               function the_content_limit($max_char, $more_link_text = '', $stripteaser = 0, $more_file = '') {              $content = get_the_content($more_link_text, $stripteaser, $more_file);              $content = apply_filters('the_content', $content);              $content = str_replace(']]>', ']]>', $content);              $content = strip_tags($content);                       if (strlen($_GET['p']) > 0) {                echo "";                echo $content;                echo " "."Read More →";                echo "";             }             else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {                  $content = substr($content, 0, $espacio);                  $content = $content;                  echo "";                  echo $content;                  echo "...";                  echo " "."";                  echo "";             }             else {                echo "";                echo $content;                echo " "."Read More →";                echo "";             }          }


title: Pages inside a page (with thumbnails)

text: I´m building a actors/movies sites and I got stuck with one thing. I have several pages with actors biography (featured image, name, about, date of birth, etc) and I have a menu with the option "actors". I would like to create a page called "actors" that could loop all actors pages with pagination, organizing them in one, two or three columns and five to ten lines. I have search a plugin/widget to do that, but I wasn´t lucky. Could anyone here help me?


title: Converting multiple loops into one single loop with pagination

text: I am using Isotope jquery plugin to filter/sort posts in Wordpress but to correctly filter the posts into the right order I have needed to output each category one after the other. To do this I've created one custom query for each category (4 categories in total, therefore 4 queries). You can see my working code here: http://pastebin.com/LTDmbbLf. I would like to convert these 4 queries into just one query but this one query must display these 4 categories one after the other (like it does currently). The reason why I want this, is because I'd like to add Infinite scroll functionality to grab the next batch of posts regardless of what category they are in. In order for this to work I need to add pagination and figured pagination wouldn't work correctly with 4 separate loops. However, if anyone can implement pagination into my existing code without having to re-write it then I'm all ears.


title: wp-query problem with author

text: I run the query:               SELECT post_author     FROM  `wp_posts`       and see that many posts have as author the value 1. I then execute in my search.php the following:               $args = array(            'author' => 1,                                 );          $the_query = new WP_Query( $args );       and get no results! Whats wrong?


title: Add additional upload field to Custom Header page

text: I use the custom header feature for my theme and I’d like to add an additional upload field to the Custom Header page in the backend (page=custom-header) for a custom logo upload. I found this but the custom options aren’t saved. Thank you for any help!


title: "WordPress installations is currently out of date" problem with difficult situation

text: [NOTE] I had asked this question in wordpress.org's support forum one month ago. But I didn't get any feedback there. And I am not sure whether or not this is right place to ask this question. But I hope there are developers from WordPress on StackOverflow to look at my question and give me some hint. **My problem is :** Few years ago I had got the opportunity to have a blog on my own domain name - (www.ganeshtiwari.com.np) , which uses version 2.7.* of wordpress. It was an free offer from a organization called rtrc.org (Redsun Technologies & Research Center, Nepal). The organization (rtrc.org) is out of business and they have closed every support. I found that my website is hosted from ( Hopkinsville - Kentucky - United States)- according to geo-ip locator. **But** now this message appears even when I open the main page or wp-admin page and I can do nothing there. The big problem is, the upgrade to new version cannot be done (now and then- never); even there was no feature/setting enabled for add plugins and change the theme.               We were checking our accounts and found that one or more of your WordPress installations is currently out of date. It's critical that you update WordPress, as its current version has some severe security vulnerabilities that put your website and hosting account in jeopardy.          We strongly recommend an upgrade to the latest stable verion of WordPress by following these steps:          1. Access the directory in which WordPress is installed via Webshell within your control panel or using your FTP client     2. Be sure to turn on the "show hidden" option and look for an .htaccess file in your WordPress directory. Delete or rename this .htaccess file     3. If you find an .htaccess.UNPROTECTED file, rename it to .htaccess     4. Login to your WordPress dashboard as an Administrator     5. At the top of the dashboard, WordPress will alert you to a new version; click the "update now" link     6. Follow the update wizard to complete the upgrade (The "Upgrade Automatically" option on the second step is recommended. You can read more about this feature here.)     7. We recommend that you further improve the security of your WordPress installation using 10 Useful WordPress Security Tweaks     8. Reset your Administrator user password          If you have any questions, feel free to contact us via phone, ticket, or chat!          Thank you!      This is not only the problem of mine, there were more than 1000 person who opened the free domain from that organization. I want to know is there any way(fixing the code by wordpress admin) to avoid this error message and let me in?


title: What's wrong with this wpdb query?

text: I want to select some tags with the same term_group, I tested it in phpadmin, the query get the correct result, but once add $wpdb flavor, it returns an empty array. Any advice?               $primary_tag_id = // a function to return term_group, result is 3, comfirmed         $terms = $wpdb->get_col( $wpdb->prepare(                 "SELECT name                 FROM $wpdb->wp_terms                 WHERE term_group = %d                 ORDER BY name ASC", $primary_tag_id                 ));


title: Filter dashboard custom post listing by user

text: Did some research, but I was unable to implement it after all. I have a custom post type accessible only by a new role. I want to filter the post type listing so that each user should see only his records (as Author users can see their posts only). I've tried to filter parse_query but it works for the main listing only (still I can see other records). Which is the correct filter to use in order to prevent malicious users to list others' records? Tried with pre_get_posts as well, but still I can see other users' posts. Which is the correct filter to use for general separation of post objects per user?


title: ajax stopped working when not logged in?

text: Have had an autocomplete field working for months but has stopped working when not logged in? Not sure when but within the last few days or week (not updated wordpress recently). already have; add_action('wp_ajax_filter_schools', 'filter_schools'); add_action('wp_ajax_nopriv_filter_schools', 'filter_schools'); in functions.php and there are no errors anywhere. response i get when not logged in is;   from safari... *Request URL:http://www.payingforit.org.uk/wp-admin/admin- ajax.php?term=holywe&action=filter_schools&postType=school Request Method:GET Status Code:302 Found* any help welcome ! Dc. jquery code                $( "#userSelectedSchool" ).bind( "keydown", function( event ) {                 if ( event.keyCode === $.ui.keyCode.TAB &&                         $( this ).data( "autocomplete" ).menu.active ) {                     event.preventDefault();                 }             }).autocomplete({                 source: function( request, response ) {                          $.getJSON( "/wp-admin/admin-ajax.php", {                           term: extractLast( request.term ), action: 'filter_schools', postType: 'school'                 }, response );                      dataToBeSent = {                     term: extractLast( request.term ), action: 'filter_schools', postType: 'school'                 }                      console.log(request.term);                  }, select: function( event, ui ) {                      var terms = split( this.value );                 // remove the current input                 terms.pop();                 // add the selected item                 terms.push( ui.item.id );                 // add placeholder to get the comma-and-space at the end // ui.item.label                 terms.push( "" );                 this.value = ui.item.label;                      $('input[name=userSchool]').val(ui.item.urn)                      return false;                  }, open: function() { $('.ui-menu').width(300) }          });      function in functions.php               add_action('wp_ajax_filter_schools', 'filter_schools');     add_action('wp_ajax_nopriv_filter_schools', 'filter_schools');          function filter_schools(){         global $wpdb; // this is how you get access to the database              $str = $_GET['term'];         $action = $_POST['action'];         $postType = $_POST['postType'];              $finalArgs =  array (             'posts_per_page'=>5,             'order' => 'ASC',             'post_type' => 'school'         );              $searchSchools = new WP_Query( $finalArgs );         $mypostids = $wpdb->get_col("select ID from $wpdb->posts where post_title LIKE '".$str."%' ");              $args = array(             'post__in'=> $mypostids,             'post_type'=>'school',             'orderby'=>'title',             'order'=>'asc'         );              $res = new WP_Query($args);         while( $res->have_posts() ) : $res->the_post();                  global $post;                  $EstablishmentNumber = get_post_meta($post->ID,'EstablishmentNumber', true);             $URN = get_post_meta($post->ID,'URN', true);             $add = get_post_meta($post->ID,'address', true);                  $schl = array('post_id'=>$post->ID,'id'=>$EstablishmentNumber, 'label'=>$post->post_title.', '.$add['town'].' '.$add['postcode'] , 'value'=>$EstablishmentNumber, 'urn'=>$URN );             $matchedSchools[] = $schl;              endwhile;              echo json_encode($matchedSchools);         wp_reset_postdata();         die(); // this is required to return a proper result     }


title: How to translate __('') strings in admin

text: What would be the best plugin to use for translating website. Thing is - i installed one multilingual plugin, but it does not pick up strings from templates. For example - the template has stuff lke `<?php _e('Search Results', 'kubrick'); ?>` in it - what plugin should i use to translate them in admin? So far i havent been able to find any.


title: Find out if enqueued script uses wp_localize_script?

text: Is there a function that can check if an enqueued script has a call to wp_localize_script attached to it?


title: Need Help Determining Where Header Error is Happening

text: I am currently writing a plugin that contains a report based on a mysql query. I would like to export this query information to CSV. Simple enough, I've done it many times outside of WordPress. I'm currently receiving an error regarding headers already sent. I know what causes this error, but cannot find in my code where the issue is. I have tried removing all other plugins, and even tried other plugins that also export CSV. The plugins that export CSV work just fine, and when my plugin is the only one activated, the error is still thrown so I am pretty sure it's an error on my part. Also need to include that this is on a multisite network activated plugin. The error points to the first header line:                   if (isset($_POST['txtExport'])) {       header("Content-type: text/x-csv");       header("Content-Disposition: attachment; filename=birts.csv");       header("Pragma: no-cache");       header("Expires: 0");            foreach ($incidentReport as $vals) {          echo "\"".$vals->student_id."\",\"".$vals->incident_desc."\",\"".$vals->incident_time."\",\"".$vals->incident_rating."\",\"".$vals->reported_by."\"\n<br/>";       }       exit;         }      Below is the actual triggered error: Warning: Cannot modify header information - headers already sent by (output started at /home/plumwd/public_html/multisite/wp-admin/admin-header.php:28) in /home/plumwd/public_html/multisite/wp-content/plugins/bart/birts_dashboard.php on line 20 I have WP_DEBUG set to true and am showing no other errors. Thanks!


title: Redirect plugin after form submit or show errors

text: I've been developing a wordpress plugin that has an admin section with a form to add and edit various things. Now after an admin submits the form I wanted to redirect if successful (to show updated values) or show the various error messages if not. I got the header errors from trying wp_redirect and after looking through SO I started to use the add_action method so I could redirect without header error messages. The problem I have now though is that my array of errors is now always null, even if the form wasn't submitted correctly. I have defined the errors variable before add_action and in the function in add_action I have                  global $errors;      If I do a var_dump of $errors in the function that handles the submit it is populated, but then on my actual page it is always empty. My guess is that I'm not familiar with the order the pages get called in WP and I'm missing something, but how does anyone else handle this?                 //the index.php for pluging       //require necessary files       global $errors = null;       include('plugin_file.php');       //Tie into wordpress hooks       add_action('widgets_init', 'plugin::register_func');       add_action('admin_menu', 'plugin::add_menu_item');       add_action('admin_init', 'plugin::check_form_submission');      Then the form submission is similar to                 //THE Class file for my plugin       static function check_form_submission(){       global $errors;             if(empty($_POST['some_field'])){                           $errors['some-error'] = 'some error';             }       if(!$errors){         //handle and redirect here        }else{       var_dump($errors); // does have values       }       }      In the actual admin page that shows the form                 //actual admin page that shows in WP       var_dump($errors); // returns NULL      will always be null even if it has values above. Anyone got any advice how to handle this? I'm new to WP plugin development so not sure what the best practice is.


title: Dequeue script, but still use wp_localize_script to pass vars

text: I need to dequeue some scripts but still have access to the vars passed via their wp_localize_script calls. Is there a way to do that?


title: How to show content for posts of a specific category only

text: I show excerpts of all posts at this site. Which works fine. However, I would like show content for posts of a specific category, while keeping all others showing excerpts. Is it possible, without a plugin? With a filter in functions.php, etc.? Working with 3.1.4, twentyten.


title: Which is the child theme and which is the parent theme?

text: In the themes folder for my blog, there are three folders and one file: The file is index.php and the folders are: twentyeleven / wordfruit / twentyten The blog is at http://wordfruit.com/blog Obviously folders could be given any label, but I think the folders are organised fairly logically. Question 1: Is 'twentyeleven' likely the child theme and 'wordfruit' likely the parent theme? Question 2: I want to edit a file so that when a user clicks a thumbnail image in the list of blog posts, the blog post opens up... (As per this post: How to make thumbnail images click into blog posts ) As I understand, I need to edit the index.php file... Do I edit the index.php in the child theme or the parent theme?


title: How can I show posts for a single category?

text: Is it possible to show posts for a single category? I tried browsing to the URL `http://mysite.com/category/foo` which does show all of the posts with category foo, but the posts lose their formatting in the listing. I'd like a full paginated listing of posts that keeps formatting. Do I need to write a plug-in for this? Can anyone give me some pointers on how to do so?


title: How to use get_option() without any filter?

text: I'm using the newest WordPress 3.3.1 and newest qTranslate 2.5.27. I have made some an AJAX script which returns a value and message in the current language. Here I get my first problem, I solve it by sending in AJAX `lang` from `qtrans_getLanguage()` and using messages with `qtrans_use($lang, '<!--:pl-->PL message<!--:--><!--:de-->DE message<!--:-->');` I have an wp_option in DB: `'example' = '<!--:pl-->polish text<!--:--><!--:de-->deutschland text<!--:-->'` and when using `get_option('example')` I am always getting `Polish text`. I was trying to `setlocale` in PHP but without any positive result. `get_option()` is working correctly in any php WordPress file or template, but not in my AJAX... EDIT: In template:               $.post('<?php echo get_bloginfo( 'template_url' ); ?>/sendmail.php', {     message: input_message,     lang: input_lang     }      In sendmail.php:               'destination_email' is set to '<!--:pl-->x@x.pl<!--:--><!--:de-->x@x.de<!--:-->'          $mail = _e(get_option('destination_email'));      Always getting Polish email... even               'setlocale(LC_ALL, 'de_DE')'      Now I'm using hardcode email               $mail = qtrans_use($lang, '<!--:pl-->x@x.pl<!--:--><!--:de-->x@x.de<!--:-->');      ...


title: Apache/Linux configuration changes to make automatic upgrade more straightforward

text: I've been reading some posts that seem to touch on this (or possibly address it, but it's going over my head). Unix is not my strong suit by a long shot. I have inherited a Fedora server that is a little bumpy when it comes to auto upgrades. Two things I've noticed: 1. It prompts me for FTP user and password. I'd like to eliminate this WITHOUT resorting to hard-coding the credentials (for a number of reasons) 2. The most recent 3.3.1 update fails for permission reasons (earlier upgrades did not fail). The workaround is to sudo chmod -R g+w ./* in the main wp directory, but I'm kind of sick of doing that every time. Bottom line: things WORK, but it's more work than I'd like. Right now, everything seems to be running under the 'apache' user, which is a member of my 'developers' group that is the same group for the various people that FTP and make changes/edits to files/folders. But any new files/folders that are created by these users do not have their group write mode set so I have to do it manually... Any thoughts? I'll need a bit of a step-by-step since I'm a unix moron. Thanks! T


title: Remove author archive

text: I'm using wordpress as a CMS. Various users on the staff write posts that get incorporated into pages manually. As far as the outside world is concerned, this is just a bunch of static pages. I want to remove all concept of Authorship, Categories, etc. It's come to my attention that I can browse to domain.com/author/userName and see the author archive. How do I disable this? I would like it to return a 404.


title: query_posts sort in multiple directions

text: I'm trying to improve my post sorting by using multiple criteria, but I want specific orders for different values. For example, I have a meta_key called 'featured' that I want to move any post up to the top. For matching 'featured', it should sort by title. The problem is that I can only define one "order" key in the query_posts function.               $args=array(                                             'post_type'         => 'portfolio-item',                                             'post_status'       => 'publish',                                             'caller_get_posts'  => 1,                                             'paged'             => $paged,                                             'meta_key'          => 'featured',                                             'orderby'           => 'meta_value title',                                             'order'             => 'desc asc',                                         );      This is the parameter array I'd like to use (notice the multiple order values. Unfortunately, this doesn't seem to be the correct form. Any suggestions?


title: woocommerce Add custom field set like billing fields

text: I am working on E-commerce functions where i require to Add custom fieldset as Profile Fields the fields in it are as billing Below are the Fields that is needed in My Check out and signup form               profile_first_name     profile_last_name     profile_company     profile_address_1     profile_address_2     profile_city     profile_postcode     profile_country     profile_state     profile_email     profile_phone      Can you please guide me on this issue how can set add all above fields in my wordpress theme and what Actions or Filters should i use to display in Checkout form Thanks in Advance Nikhil


title: Weird lightbox phenomenon

text: I have one weird thing happening with lightbox on my website. If I add a lightbox image or gallery and then click on the image, the first time it will navigate directly to the image file. If you then click the back button and click the image again, lightbox loads up normally. Any thoughts on why reloading the page after the first click makes lightbox work properly? Thanks example page


title: WP Super Cache compression not working

text: I have WP Super Cache installed, and compression is turned on. However, both GIDZipTest and Google Page Speed Insights Chrome extension say that compression is not enabled. I added the following to my .htaccess file, and they still say compression is not enabled:               AddOutputFilterByType DEFLATE text/plain     AddOutputFilterByType DEFLATE text/html     AddOutputFilterByType DEFLATE text/xml     AddOutputFilterByType DEFLATE text/css     AddOutputFilterByType DEFLATE application/xml     AddOutputFilterByType DEFLATE application/xhtml+xml     AddOutputFilterByType DEFLATE application/rss+xml     AddOutputFilterByType DEFLATE application/javascript     AddOutputFilterByType DEFLATE application/x-javascript      **UPDATE** : I have since disabled WP Super Cache, and I'm testing W3 Total Cache.


title: Share Button Like SuperUser

text: I am loving the share buttons on SuperUser and looking forward to find a plugin which has similar share buttons on the right of the post. Any ideas? ![enter image description here](http://i.stack.imgur.com/Q3hvi.png) Thanks in advance.


title: how to retrieve subcategory related to category in edit page from view page by using javascript

text: I am doing a basic product page by using JavaScript,php and html. I retrieve the category related subcategory drop down list from view page .but my subcategory is not change according my category .I am a biggner of PHP.so please help me.thanks to all advance.


title: post not open on blog page

text: Posts do not show on blog pages. When I click the post title on blog page it returns the notification of "not found 404" . I used the post permalink. This doesn't work: ![enter image description here](http://i.stack.imgur.com/x8UsA.png) When I used default permalink, it works fine: ![enter image description here](http://i.stack.imgur.com/5OMnN.png) See my website Here is my _.htaccess_ file code               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /genesisdur/     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /genesisdur/index.php [L]     </IfModule>          # END WordPress      Please help me to solve my problem. Thanks.


title: Integrate a forum into wordpress site

text: I have a wordpress site, which is running fine. Beside that site, I have a forum www.mywordpresssite.com/forum running. Now I want to integrate this forum (phpbb) into my wordpress site. What I would like to do is adding a menuitem called forum, and link this to a file called forum.php, with following content:               <?php get_header(); ?>          <div id="content"><!-- if it's not in the header, that is... -->     <iframe src="http://www.mywordpressite.com/forum" width="100%" height="80%" />     </div>          <?php get_footer() ?>      This way, I suppose I can preserve my header & footer from my wordpress site en between them, my forum can be displayed. My question: how can I call this file forum.php? I created the file and put it in the theme directory.


title: Edit the Publish Widget Options

text: Another noob question - under the 'Publish' widget in a default vanilla installation of WordPress 3.3.1, we would like to 'simplify' the Publish widget/ Specifically, we would like to have no 'draft' or 'Pending Review' functionality. Immediately, when the user clicks publish, the post is published. Is this possible and if so, how? Help!!


title: How do I override the search template in a plugin?

text: How do I override the search template i.e. used inside a theme with a custom search page inside a plugin? Please point our any relevant action/filter hooks which can be used to do this. Any help is highly appreciated.


title: Facebook Feed Grabber Cache Relative to Dev Machine, not Server Install

text: One of our devs left last week and I inherited some tasks for one of his projects. I've never really worked with WordPress and I am not overly familiar with PHP (I am an app dev), so I am completely lost here. Basically, our Facebook feed (which is using the Facebook Feed Grabber plugin) will not display. When I went into the admin panel in our testing environment, it said the following: ![enter image description here](http://i.stack.imgur.com/53L34.png) I am assuming this is the issue. We cannot cache any data therefore no data can be displayed. The path is relative to the old dev's work env and I cannot get it to change. After some digging, I found a line in the `facebook.php` class that seems to be the setting for that option.               'cache_folder' => WP_CONTENT_DIR. '/uploads/cache/',      I also tried changing that to `content_url( 'uploads/cache' )` as well and ended up with the same result. Could anyone point me in the right direction?


title: How can I write comments/hidden text in a post?

text: When writing a post, is it possible to write text that is only visible when editing a post (comments intended exclusively for me) and not visible when when viewing the blog?


title: How to disable drafts?

text: Using Wordpress 3.1 is it possible to completely disable the drafts functionality or at least remove the "Save Draft" button from the post screen?


title: How to remove bulk edit options

text: Is it possible to completely disable Bulk Edit functionality? I'm using Wordpress 3.1.


title: Adding re-type email and check it if the email match

text: I want to add email field on the registration page and check it if the two email that the user input matched or not. I am using eshop theme by templatic. Any help would be appreciated. Thanks!


title: How to implement AJAX pagination for get_posts (CPT)?

text: I need to implement AJAX pagination: « Previous 1 2 3 ... 70 Last » for a CPT get_posts() loop:               // main images query     // all filters should be applied here     $args = array(         'imagepress_image_category' => $category,         'post_type'                 => get_option('ip_slug'),         'post_status'               => 'publish',         'posts_per_page'            => $ip_ipp,         'orderby'                   => $ip_order,         'order'                     => $ip_order_asc_desc,         'author'                    => $author,              'meta_key' => $ip_meta,         'meta_query' => array(             array(                 'key' => $ip_key,             )         )          );     $posts = get_posts($args);     //      How would I accomplish this? **UPDATE #1:** I want to create a loop function and call it with a different offset each time, without using an external PHP file. I couldn't find any reference to such a behaviour. **UPDATE #2:** I wasn't able to properly implement this, so I used a jQuery pagination solution combined with LazyLoad. It does the job.


title: Embedding Youtube video on comments

text: In my posts, you can embed a video of Youtube by adding the link to the post. You don't have to do anything beside that. On my comments, I can't do the same thing. Is it possible to embed Youtube video's by putting the link only (or a different manner, but I prefer the first), and if so, how?


title: How can I import users into WordPress?

text: I have a spreadsheet (XLS) of names, email addresses, and passwords from another content management system. Is there a way to import these folks as users (I think subscriber level, but some may be Editors as well) into WordPress?


title: Animate.CSS with a child theme

text:
I am trying to implement animate.css with my Twenty Twelve child theme. I read this post about trying to implement it (option 1), but it is not working. The only thing I am doing differently is that I have a child theme. Any thoughts? Thanks a lot! **Edit:** Milo, you're first answer did not work. This is my code in my child theme's function.php:               function paukai_2011_styles() {         wp_register_style( 'animate-css',             get_stylesheet_directory_uri() . 'http://shaansingh.me/wp-content/themes/twenty-twelve-child/animate.min.css',             array(),             '20120725',             'screen' );         wp_enqueue_style( 'animate-css' );     }      And here is my html:
This is dummy text
      No luck unfortunately.


title: Posting Photos and Other Attachments in a BuddyPress Forum?

text: I recently built a WordPress site based and am using BuddyPress for some interactive community functionality. Members are using the forums built into BuddyPress, but are looking for a way to attach or embed pictures in their posts. Is there any way to extend the BuddyPress forums to allow this, or are there existing plugins that allow this? Or, is there a better forum that can be integrated into WordPress?


title: The Admin Dashboard Div

text: How can I style and add new divs in the admin dashboard area inside of the wpbody div under the Dashboard Tab? I would like to insert a new div in the wpbody div...


title: Allow access to a page for admins only

text:
I need to know how to make a page template in WordPress that can only be accessed by admins. How could I apply it to the following template?               <?php /*     Template Name: Agency Area     */     ?>     <?php get_header(); ?>

             <?php wp_nav_menu(); ?>

          <?php get_footer(); ?>      I'd prefer to do it without plugins.


title: SEO smart plugin not working for words ending with ä, ö, å

text: Custom keywords don't get linked if words end with this letters : ä, ö, å It works if those letters are inbetween. any idea how to fix this? Custom Keywords : >   1. meäts, www.google.com - works >   2. tillhört, www.rediff.com - works >   3. Elektrobitissä, www.git.com - does not work >   4. tillhrtö, www.rediff.com - does not work > So out of the above keywords, 1 and 2 works. 3 and 4 does not work. If word ends with those special letters, word is not linked otherwise if letter appears in any position except last, it works. http://wordpress.org/extend/plugins/seo-automatic-links


title: Passing User_Fields to Contact form 7

text: I'm trying to pass some custom field data to contact form 7 - The billing address and name and email address. I've created a function that pulls in these details from the database - is there an easy way I can send these details in an email when a forms sent? Can I possible somehow pass the data to the form sending template. Here is my function that pulls in the correct data.               function rinfo() {          if ( is_user_logged_in() ) {         global $current_user;         get_currentuserinfo();                echo 'Username: ' . $current_user->user_login . "\n";           echo 'User email: ' . $current_user->user_email . "\n";           echo 'Address: ' . $current_user->shipping_address_1 . "\n";     }          }


title: Trigger a cron every 24h GMT -8

text: I' like to run a cron every 24 hours at midnight PST ( = GMT -8 ) This is what I have               if ( !wp_next_scheduled( 'cron_hook' ) ) {         //reset on 00:00 PST ( GMT -8 ) == GMT +16         $timeoffset = strtotime('midnight')+((24-8)*HOUR_IN_SECONDS);         if($timeoffset < time()) $timeoffset+(24*HOUR_IN_SECONDS);         wp_schedule_event($timeoffset, 'daily', 'cron_hook');     }      This sets a daily cron on midnight GMT -8 (24-8) and postpone it 24 hours if it's already in the past so the cron doesn't get triggered at the time of creating. Am I correct with this approach or do I miss something? I've already tested it but since my server is running with GMT + 0 I cant verify that for other timezone


title: How to save a label for an extra user meta field and to display it later?

text:
Bellow is how I currently add, save and display an extra user meta field:               /* Add Extra Fields to the User Profile */     function extra_user_profile_fields( $user ) {        ?>

         <?php _e("Publications"); ?>	                  <textarea rows="10" cols="450" name="publications" id="publications"  class="regular-text" />         <?php echo esc_attr( get_the_author_meta( 'publications', $user->ID ) ); ?>         </textarea>

       <?php      }          add_action( 'personal_options_update', 'save_extra_user_profile_fields' );     add_action( 'edit_user_profile_update', 'save_extra_user_profile_fields' );          /* Save extra user profile fields */     function save_extra_user_profile_fields( $user_id ) {       if ( !current_user_can( 'edit_user', $user_id ) ) { return false; }         update_user_meta( $user_id, 'publications', $_POST['publications'] );     }          /* Display the selected user meta data with a shortcode */     add_shortcode('user_meta', 'user_meta_shortcode_handler');     /* usage: [user_meta user_id=1] */     function user_meta_shortcode_handler($atts,$content=null){ ?>       <?php         echo '
Publicații
';         echo wpautop(get_user_meta($atts['user_id'], 'publications', true));       ?>       <?php     }      In this way, with only one shortcode I can display multiple metadata at the same time. Now I want to modify this code to be able to save also a label for each user meta field and to display it/them later together with the corresponding value. How to do this with my code?


title: How to remove calendar widget?

text: I just want to remove calendar widget from the dashboard. How can I do that?


title: Image Upload "exceeds the maximum upload size for this site", but php.ini is correct

text: I'm getting an "file.png exceeds the maximum upload size for this site" error. It's saying the upload limit is 1MB when trying to upload an image that is 2.5M on WP 3.5. It is setup in multi-blog mode (if that matters). I have set my php.ini file to 64M for post_max_size and upload_max_size, and it's working for other (non WordPress) sites on my server. I have no idea where the 1MB limit is coming from. I don't have a host, we run out own servers. Any ideas? From `phpinfo();` :               upload_max_filesize     64M     64M     post_max_size           65M     65M


title: How to add character to content of post?

text: In per posts, there are **"oo/x/"**. How to add "0" before "x" if `length(x) < 10` ? Examples:   * x=12345678 ; length(x) = 8, so add "00" before x ===> x=0012345678   * x=1234567 ; length(x) = 7, so add "000" before x ===> x=0001234567   * x=123456789 ; length(x) = 9, so add "0" before x ===> x=0123456789 Do you understand ?


title: How can plugins have their own pages?

text: My plugin needs to introduce a number of interfaces to Wordpress for the public traffic. What is the best way of introducing new interfaces?


title: How can I improve the line break handling in the WYSIWYG editor?

text: I always find myself in HTML mode in the editor to try and get simple things like breaks between paragraphs to show up right (using `<p></p>`). Is that normal? Is there a better editor out there that I could use?


title: Post formats "audio" and "video" only showing in index.php

text: I have files in my theme called `single-audio.php` and `single video.php`, but when I click on an audio post-format or video post-format wordpress uses the `index.php` instead of my `single-audio.php` or `single-video.php` files. Any ideas?


title: How can I use RDFa with WordPress?

text: Drupal 7 has support for the semantic web (RDF/RDFa). Is there a plugin or similar plans for WordPress?