title: Using IDX feed to display agent's and listings with agent's info associated for Real Estate Website

text: Trying to figure out how to get a user/agent to be associated with their IDX/mls number. Have been trying to find a way around this since Diverse Solutions does not give a feed for agent's info, only REIN(Virginia's MLS) has the agent's photo and listings associated. No real estate themes have the main search function pulling properties/agents from an IDX feed. Many themes say they are integrated with this functionality but I have purchased about 10 of them even after asking and then am told otherwise after purchasing. For now I am just trying to be able to have a custom HTML widget for each user on my site http://erarepros.com/author/bjill/. How can I add a custom widget for each agent/user? Diverse Solutions provides a way to get a feed for each agent using their MLS ID http://erarepros.com/idx/?idx-q-ListingAgentID%3C0%3E=7994 \--where 7994 is the agent's REIN ID number


title: Why does querying on post_tags (which has been applied to custom post types) only return posts?

text: So I've created a little jquery cycle based feature rotator that pulls from the post_tags. I added the post tags to my other custom post types like this:               register_taxonomy_for_object_type('post_tag', 'reviews');     register_taxonomy_for_object_type('post_tag', 'interviews');     //...      When I add a 'featured' tag to one of my reviews and one of my interviews, and query for it thusly:               $query = new WP_Query( array( 'post_tag' => 'featured' ) );      I get two random posts instead of the two expected results. Any ideas?


title: add_action() in switch statement

text:
I'm using the approach of having all of my single-views in one `loop- single.php` and thus have a simple switch statement that will render each single-view based on the post type:               switch($post->post_type) {              do_action('basey_loop_single');              default: ?>                  <?php echo apply_filters('basey_page_title_news', __('
News
','basey')); ?>             <?php /* Start loop */ ?>             <?php while (have_posts()) : the_post(); ?>                 <?php basey_post_before(); ?>                     <article <?php post_class() ?> id="post-<?php the_ID(); ?>">                         <?php basey_post_inside_before(); ?>
<?php the_title(); ?>
                                 <?php basey_entry_meta(); ?>
                                 <?php the_content(); ?>
                                                              <?php wp_link_pages(array('before' => '
' . __('Pages:', 'basey'), 'after' => '
' )); ?>
                                     <?php echo __('Posted in ','basey'); the_category(', '); ?>
                                 <?php $tag = get_the_tags(); if (!$tag) { } else { ?>
<?php the_tags(); ?>
<?php } ?>
<?php comments_popup_link( __( ' 0 Comments', 'blank' ), __( ' 1 Comment', 'blank' ), __( ' % Comments', 'blank' ), 'comments-link', __('Comments closed', 'blank')); ?> <?php if ( comments_open() ) : ?>| <a href="<?php the_permalink(); ?>#respond" title="<?php echo __('Add a Comment','basey'); ?>"><?php echo __('Add a Comment','basey'); ?><?php endif; ?>
                                                      <?php basey_post_inside_after(); ?>                         <?php comments_template(); ?>
                 <?php basey_post_after(); ?>             <?php endwhile; /* End loop */ ?>          <?php }      You can see at the top that I've included a `do_action()` call for what I hope can be an extendable area (that can be plugged-into via other plugins or theme functions I write). While this is also part core PHP question --> is there a way to plug into a switch statement the same way you would an array (like so):               function add_extra_fruits($fruits) {          $extra_fruits = array(         'plums',         'kiwis',         'tangerines',         'pepino melons'     );          // combine the two arrays     $fruits = array_merge($extra_fruits, $fruits);          return $fruits;     }     add_filter('add_fruits', 'add_extra_fruits');


title: Preloading custom pages in cache using WP Super Cache

text: I am developing Exposure Inc. Co and am using the RB-Agency plugin for modeling database. The plugin is not very well architected and makes a ton of HTTP queries resulting in high latencies. When a page is cached, it's all good and load times are around a second. I am using the WP Super Cache Plugin. The profiles that RBAgency generates are not standard WordPress pages or posts but are dynamically generated from profile information (http://exposureinc.co/profile/walter-coppage/).   Thus, WPSC's preloader doesn't identify and cache them. Once they are loaded for the first time, they are cached and subsequent load times are good. Is there some way to cache all these pages? The profile IDs are saved in the table `wp_agency_profile` in column `profile_gallery`. Could WPSC be made to reach out to the table and cache the found pages?


title: Filter post listing by meta value which is a date

text: This question is almost what Im trying to achieve. Create a filter for posts based on a custom field. My custom field is a date and I would like to create a date filter (monthly) based on this custom field for the post listing admin screen. I'm not using the normal date as this is an historical website I'm creating and some posts are from many years ago.


title: How pull wordpress blog data using Blogger API using python

text: Wordpress mentioned that it supports Blogger API (link). So, can anyone tell me how to use Blogger API (using python) v3 to pull wordpress public blogs data. Or, is there any wordpress API to pull public data from its blogs? (Lang: Python). Any useful documentation that clearly explains the procedure would also be appreciated.


title: How to Create a Repeatable Meta Box

text: I would like to know how to create repeatable meta-boxes like in this video: http://www.screenr.com/a17s [starts at around 40 seconds]. I saw an answer on how one creates a repeatable section within a meta-box, but I want to know how to repeat the entire box (as seen in the video).


title: How to return multiples lines in a shortcode?

text:
I found this example of a shortcode on the Internet:               function project_shortcode( $atts, $content = null ) {         extract( shortcode_atts( array(             'class' => '',             'id' => '',             ), $atts ) );                  return '
' . $content . '
';          }     add_shortcode('button', 'project_shortcode');      This is the output I want:

                 <img src="<?php bloginfo( 'template_url' ); ?>/images/studyatbest.png">

BEST LANGUAGE CENTER

BEST Language Center is an educational establishment in Taichung, Taiwan. I was asked to build and design a website they could use to offer classes, programs and display photos online.

ROLE

Design, HTML/CSS, JavaScript

YEAR

2010

WEBSITE

studyatbest.com

      But I'm not sure how to do it so that I can return multiples lines in the shortcode (in order to keep the code clean). Any suggestions?


title: MySQL query to set wp_postmeta using term_taxonomy_id value

text: I have a need to set the `wp_postmeta` value (in table: `wp_postmeta`) on every post that has a specific `term_taxonomy_id` (in table: `wp_term_relationships`): Specifically:   * run a query against every `post_ID` that has `term_taxonomy_id` value of 18   * if the `wp_postmeta` for that `post_ID` doesn't contain the key of `_category_permalink_` then add it with the value set to 18, otherwise ignore it My MySQL foo is poor, so apologies if this makes no sense or I have got tables, names around the wrong way. **UPDATE:** In relation to answers/comments below by @deadlyhifi and @Jot I have the following:               function cleanup_permalink() {         static $fnCount = 0; //to run only once         if ($fnCount) return;         $fnCount++;         global $wpdb;         $results = $wpdb->get_results("SELECT `object_id` FROM $wpdb->term_relationships WHERE `term_taxonomy_id` = 18");         foreach ($results as $result) {             add_post_meta( $result, '_category_permalink_', '18', true);         }     }     add_action('init','cleanup_permalink'); //i'm assuming init is the best place?


Error establishing database connection on app engine after deploying wordpress. I got an error Notice: Undefined property: batcache::$query in /base/data/home/apps/s~project-id/wp1.xxxxxxxxxxx/wordpress/wp- content/advanced-cache.php on line 388 Can’t select database We were able to connect to the database server (which means your username and password is okay) but not able to select the wordpress_db database. Are you sure it exists? Does the user root have permission to use the wordpress_db database? On some systems the name of your database is prefixed with your username, so it would be like username_wordpress_db. Could that be the problem?


title: How to configure Buddypress Activity Plus to work with front end posting?

text: I would like to use the feature of Buddypress Activity Plus on the front end posting code by Voodoopress. This plugin supports automated rich media embed (when a user posts a link on the activity stream). I want that rich media support on the front end posting page. I have no idea how to attach the button set (which appears under the activity stream) to the form. Please help.


title: Display tags in list without link

text: This seems like it should be something that's really simple to do, however it's apparently not. I don't want tags to be links, but I want them to display in an unordered list, with each tag inside an `<li>` get_the_tags allows you to echo them without the associated link, but I have no idea how to wrap them in li's.                <?php     $posttags = get_the_tags();     if ($posttags) {       foreach($posttags as $tag) {         echo $tag->name . ' ';        }     }     ?>


title: Storing Options in a Shortcode

text: I am creating a Wordpress plugin. I want to create 1 single shortcode that changes output based on the settings changed by the user on the admin settings page. So for starters, I have something like this below:               add_shortcode( 'my_shortcode', 'my_shortcode');       function my_shortcode($atts) {         $atts = shortcode_atts (       array (       'display' => get_option('setting_1'),       'toolbar' => get_option('setting_2'),       'branding' => get_option('setting_3')       ), $atts);          }      What do I need to do next in order to store these settings into a single shortcode that keeps it's name despite the settings changing?


title: How to add paging to query

text:
In the script below, I'm calling out from archive.php to functions.php to retrieve a list of posts that have been flagged in a category reserved for my "blog" posts. I'm listing these posts in summary with the count determined by an option called "blog_count". I need to add paging to this function so that the blog_count determines the initial page count, not the total number of blog posts returned. What changes do I need to make to the get_posts() call to include this paging? I've tried adding 'offset' => 3 for example, but it only list the offset posts, not the previous.               //called from archive.php to handle posts placed into "blog" category     if(is_category())     {         if(get_option('inner_blog') && (get_query_var('cat') == get_option('blog_cat')))         {             //call function to output posts as in a blog format             get_blog_links();         }          else          {              //just a standard summary listing of posts in this category             get_category_links();         }     }?>                //function inside functions.php      function get_blog_links(){         $hasChildCats = get_term(get_query_var( 'cat' ), 'category');         if($hasChildCats->count <= 0) return;         global $post;         $cat = get_query_var( 'cat' );         //set the target category and initial page post count         $args = array('cat' => "$cat",'post__not_in' => get_option('sticky_posts'),'numberposts' => get_option('blog_count'));         $myposts = get_posts($args);echo '

';               //loop over the resultset         foreach($myposts as $idx=>$post){ ?>

<a href="<?php the_permalink(); ?>"><?php the_title(); ?>
         <?php          setup_postdata($post);         echo '<address>Posted on: <time datetime="'.get_the_time('Y-m-d').'">'.get_the_date().'</time> By: '.get_the_author().'</address>';         if(has_post_thumbnail() && get_option('cb2_show_thumbs')) the_post_thumbnail('thumbnail', array('class' => 'alignright', 'style' => 'margin:10px;'));              get_blog_excerpt();              if(has_post_thumbnail() && get_option('show_thumbs')) echo '

';?>
         <?php } echo '

';         ?>
             <?php next_posts_link('« Older Entries') ?>             <?php previous_posts_link('Newer Entries »') ?>
         <?php      }


title: Add file name column to media library

text: I've migrated hosts for a WordPress site, and a lot of my images have the same title. I am trying to pinpoint one media file by the file name, but file name is not a column listed in Media Library. I don't want to have to wade through dozens of images with the same title trying to find the problem file name, so I can find the correct URL to this image. **How can I add file name to the list of columns in Media Library?** I can't search the media library by file name either.


title: Changing MySQL password via WHM - does this affect WordPress?

text: For security, I changed the CPanel password for an account via WHM. There's a checkbox option that says "Sync MySQL password with account password." If I go ahead and change the password, does that create a problem for WordPress that's installed on that domain?


title: Adding JS function as third parameter in do_action

text: I have this JS function named as "myjsfunction()".               function myjsfunction() {          jQuery('#html_admin_show').hide();     jQuery('#html_admin_edit').show();          }      One limitation is that I cannot edit the original JS function like to put some PHP tags, etc. How is it possible to call this JS function inside a Wordpress do_action hook? I'm preferring to add it as third parameter because I'm already using the second parameter, so something like:               do_action('myhelp', 'mysecondfunction', 'myjsfunction');      But it is not showing the element #html_admin_edit when the page runs. Any ideas how to call this function? Thanks.


title: Is there a plugin to help with translation of other plugins?

text: I remember seeing a plugin that helps with the translation of other plugins. Anyone remember the name of that plugin? Thanks.


title: WAMP vs XAMPP pros/cons - for running a local testing server?

text: What are the major pros/cons that can help in deciding which of the two to choose: WAMP vs XAMPP for running a local testing server for WordPress? p.s: I now see stackoverflow had a discussion about it.


title: How can I get the page or post language when I use wpml?

text: I'm using WordPress MultiLanguage Plugin and I want to know what is the language of a specific element, page or post. I do have the `id` but I want to obtain the language.


title: Including php files within template

text: Let's say in my theme functions.php file, I included a php file that's only accessible in the admin control panel and named theme-options.php.               require_once ( get_template_directory() . '/theme-options.php' );      As I said, this file is accessible in the admin control panel only with this basic structure into it:               function my_theme_init(){         register_setting('my_theme_group', 'my_theme');     }     add_action( 'admin_init', 'my_theme_init' );          function theme_page_function() {         add_menu_page( 'My New Theme', 'mynewtheme', 'manage_options', 'mynewtheme', 'theme_options_do_page');     }     add_action( 'admin_menu', 'theme_page_function' );          function theme_options_do_page() {         ?>         <div class="content">         <!-- options content -->         </div>         <?     }      My questions is, does this file get executed when browsing from the front end? The file is included in the public functions.php file but the functions works only in the admin control panel. I'm asking this question because the theme-options.php file I'm creating would contain alot of mysql queries and I don't want it to be run everytime a normal visitor visits the website.


title: Best practice for including plugins as part of a theme?

text: I'm working on a theme that includes some functionality I've developed as separate plugins (as I'm hoping to release them independently). I'd like to include these plugins as part of the theme core and I've noticed that some developers include plugins as files or subdirectories along with their theme, but over time that can ultimately lead to maintaining two versions of the same plugin - one for the plugin repository, one for the theme - but I'd like to avoid that, if possible. What's the best practice for including plugins as part of a theme?


title: User bar above logotipo?

text: I am looking for a simple example on how to create a user bar or a simple theme with it that can serve me as example. What I meant is something like we have here on Wordpress Answers if u get above the logo you have a userbar with information when user is logged in and options to login/register when user is not logged in. I did a small search around here with the terms navigation bar and user bar but didnt find anything for the header.


title: How to add a description to Widgets?

text: The codex doesn't seem to say how one would go about adding a description to a custom widget registered with `wp_register_sidebar_widget()`. The default description seems to be the name of teh widget itself.               function myFunc(){       /* widget code */     }     wp_register_sidebar_widget( 'wdgt1', 'Site Map', 'myFunc', array() );      ![alt text](http://i.stack.imgur.com/9raIo.jpg)


title: What are the advantages of WordPress over other systems?

text: I've tried to explain the benefits of WordPress to others; comparing it to static sites is easy, as (most) everything can be done online with WP. I have more difficulty comparing and contrasting with other content management systems such as Drupal. I realize that there is no perfect system for every use, but what features - if any - of WordPress would you point out as being easier or more useful, compared to other tools? I am particularly interested in features regarding use of WP as a CMS, not just a blog.


title: Extend the Admin Post/Edit page

text: I want to create a plugin that will place a few elements on the post edit page. How do I do this? Is there an action that is run after before the post_edit page is loaded?


title: How to hide/redirect the author page

text: I have a website where I let people subscribe. I would like to only show the author page for actual authors who have written a post. I wrote this code that checks for post the problem is I can't use a `wp_redirect` or include a template that uses it because then I get everyones favorite "cannot redifine headers header" message. I could display a "User has no post message but I think redirecting them to the main author page is a better option.               if ( is_author() ) : ?>              <?php $id = get_query_var( 'author' );              $post_count = get_usernumposts($id);         if($post_count <= 0){                       //This line could also be wp_redirect                       include( STYLESHEETPATH .'/author-redirect.php');                      exit;           }     endif;?>      Thanks


title: current_user_can on WordPress 3.1.1

text: I just upgraded to WordPress 3.1.1 and suddenly I'm getting the following error: `Fatal error: Call to undefined function wp_get_current_user() in /home/arisehub/arisehub.org/wp-includes/capabilities.php on line 1028` I've narrowed it down to my usage of "current_user_can" Example: ` if ( !current_user_can('manage_options') ) { add_action('admin_init','customize_page_meta_boxes'); }` Removing that reference to current_user_can removes the errors. Any ideas?


title: Minifing js files with w3 total cache and expiring the combined file

text: I'd like to clarify several details about how w3 total cache works. I'm using w3 total cache to combine multiple js files into one. I'm also setting expires headers from the browser tab to twenty days. Garbage collection interval is set to one day. When the combined file is rebuilt due to garbage collection will the combined file name change if the js files haven't been changed? I guess it will not change as otherwise users won't be able to use the cached one. If I modify one of the files will w3tc automatically detect it or do I need to clear the minify cache? To sum up I am interested in which cases the combined file name changes and do I have to worry about clients using older version do to expires headers and how w3tc manages it.


title: Qtranslate not working on wordpress loop read more link

text:
I have a multilingual website (English and Welsh) and I am using the qtranslate plugin. Everything works OK however I cant seem to get the 'Read more' permalink to change to the corresponding language in my wordpress loop. My code is the below:               <?php     //...     $output .= '
';     $output .='
'.get_the_title().'

'.$short_excerpt.'

 Read More

';     ?>      I've tried [:en] and [:cy] before the readmore text, but still can't seem to get it to work. Does anybody have any ideas on how to get it to work? Any help would be greatly appreciated :)


title: Built-in spell checker not working in Wordpress 3.3.1

text: I am using WP 3.3.1 and have noticed that the built-in spell checker (ABC button) does not work, even when there are mis-spelt words. I have read a number of forum posts that essentially recommend using a standalone plugin to handle spell checking, however is there a fix for the built-in spell checker? Or am I resigned to installing another plugin?


title: Advice on setting up a site with front end registration

text: I have been tasked with creating a site for a large audience, and many of the audience will require some sort of sign up. They may require certain account controls (visual things, like theme colours for colour blind people) but largely it will just be a way to monitor the use of the contact features (so users can monitor their previous interactions like a ticket system) My question really is simply, where do I start? Is Wordpress the right tool for this job? If not, what is? If so, what methods should I be looking into to start the research going? Sorry for the broadness of the question, but I feel a little lost at the moment.


title: Total Count of Posts NOT in Selected Categories?

text: I need to get the total number of posts that are not in selected categories. I have category IDs of the categories that I want to exclude from count (in the variable `$folio_cat_ids`) So far I have this code which is not working,               $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts        WHERE post_status = 'publish'          AND post_type = 'post'          AND post_name NOT LIKE '%revision%'          AND post_name NOT LIKE '%autosave%'          AND post_category NOT IN($folio_cat_ids)");      Please help.


title: Auto login users after registration and email confirmation

text: I'm using the UPME plugin for user registration and it auto sends the email confirmations to users. Then users go to a "confirm your email" page. This is my code at functions.php               function auto_login_new_user( $user_id ) {     wp_redirect( "http://example.com/page/" );     // wp_set_current_user($user_id);     // wp_set_auth_cookie($user_id);      }      If I put the commented code, they are logged in as they go to the page. This is my activation link sending code:                       if (!empty($activation_status) && 'INACTIVE' == $activation_status) {                  $current_option = get_option('upme_options');             $link = get_permalink(8042);                  $query_str = "upme_action=upme_activate&upme_id=" . $user_id . "&upme_activation_code=" . $activation_code;             $activation_link = upme_add_query_string($link, $query_str);                            $message = sprintf("Dear %s %s", get_option('first_name'), get_option('last_name')) . "\r\n\r\n";                   $message = sprintf(__(" Someone (hopefully you) has used this email to register at %s :",'upme'), get_option('blogname')) . "\r\n\r\n";             $message .= __('Please click the link below to verify your ownership of this email:','upme') . "\r\n\r\n";             $message .= __('You will not be able to log in to use your account until you do so:','upme') . "\r\n\r\n";             $message .= sprintf(__('%s'), $activation_link, $activation_link) . "\r\n\r\n";             $message .= __('Thanks','upme') . "\r\n";             $message .= sprintf(__('%s'), get_option('blogname'),'upme') . "\r\n";                  /* UPME Filter for customizing new user activation email content for users  */             $message  = apply_filters('upme_new_user_act_content',$message,$user_login,$user_email,$activation_link);             // End Filter                  $subject = sprintf(__('Re: Please Confirm Your Email Address for %s','upme'), get_option('blogname'));                                 /* UPME Filter for customizing new user activation email content for users  */             $subject  = apply_filters('upme_new_user_act_subject',$subject);             // End Filter                  wp_mail(                     $user_email,                     $subject,                     $message             );         }      }          }      How can I make a user auto log in after clicking the activation link from their mail?


title: Problem with WP_Query sort

text: I have the following custom query written for a page- ` $menu_loop = new WP_Query( array( 'post_type' => 'page', 'posts_per_page' => 50, 'post_parent' => 616, 'order_by' => 'post_title', 'order' => 'ASC' ) ); while ($menu_loop->have_posts()) : $menu_loop->the_post(); ` The problem is, when the content is output to the page, it is NOT in alphabetical order by post_title. This has really been mystifying me because if I manually query the DB with- ` SELECT * FROM wp_2_posts WHERE post_type = 'page' AND post_parent = 616 ORDER BY post_title ASC ` then the results are returned correctly. Further, I print_r($menu_loop) and one of the array entries is the actual query sent to the DB and it is wrong and showing- ` [request] => SELECT SQL_CALC_FOUND_ROWS wp_2_posts.* FROM wp_2_posts WHERE 1=1 AND wp_2_posts.post_parent = 616 AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish') ORDER BY wp_2_posts.post_date ASC LIMIT 0, 50 ` which if you look you'll see the ORDER BY statement is sorting by the post date, not the post title. What am I doing wrong here?


title: Adding a blog details item to an IF statement

text: I need to add the blog ID to an IF statement within a theme. I have the following code which works fine as is:               <?php global $blog_id; $current_blog_details = get_blog_details( array( 'blog_id' => $blog_id ) ); echo $current_blog_details->blog_id; ?>      But I am trying to add this to an IF statement:               }else if(isset($_FILES['photo'])) {                       $file = &$_FILES['photo'];             $allowedExt = array('jpg', 'png', 'jpeg', 'gif');             $destination = RBISTA_IMAGES.DS. 'photo.jpg';      The $blog_id needs to in front of photo.jpg - so it would result in 3photo.jpg. Can anyone help with this please?


title: Malware installation during plugin update?

text: I update my wordpress blog daily (current version: WordPress 3.5.2). Today I installed an update of "Search everything". After that, my webspace was infected by malware. Interestingly, my blog is hidden using .htaccess, and I'm the only one using it. My provider emailed me, that the infection took place via wordpress. How can I find out I the plug-in contains the malware? Is there a list with the latest security issues?


title: how to make social media buttons start only from under a photo/post?

text: this is the website http://filldevoid.com/test/ i want the social buttons from under the post to start everytime under the photo, not on the right of the photo (cause it does that, where it has enough space) so like in first photo, not like in second. what kind of condition or what could i use? i tryed br and p, adding them into the beginning of the share, or the end of the post.. but with no effect.


title: Add custom menu item using wp_nav_menu_items filter

text:
I have added a snippet to add a "Profile" link to my website navigation menu. My code:               add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link');     function my_nav_menu_profile_link($menu) {           if (!is_user_logged_in())              return $menu;         } else {              $user_data = bbp_get_user_profile_url( get_current_user_id() );              $profilelink = '
Profile
';              $menu = $menu . $profilelink;              return $menu;         }     }      This code correctly display profile link in my menu, but now I want to move this "profile" link as sub menu of another main menu. My Menu structure is as follows: > Home | My Account | Categories I would like to add "profile" link under "My Account". Any suggestions to solve this problem?


title: Force Wordpress to Show Pages Instead of Category

text: I am trying to create a SILO structure on one of my WordPress site. I have always checked this option on Yoast SEO plugin "Strip the category base (usually /category/) from the category URL." So my category pages have this URL: sitename.com/apple/ (where "apple" is the category page) Now I want to create a new "page" with the same slug, apple. I can create a new "apple" page easily, however, when I go to sitename.com/apple/ the category page is displayed -- instead of the newly created page. My question: Is there a way to "override" the default priority of category over a page? I'd like to show page because I will have control over it -- I can customize, add more content, and change them easily (plus, pages are going to help me structure my site better) Appreciate your help!


title: Buddypress - adding profile fields to Group > Members directory

text:
I'm trying to add custom profile fields to the member profiles that show on the Group > Single template but `bp_member_profile_data` doesn't seem to return anything. This works fine when added to the members-loop.php:               <?php if ( bp_get_member_profile_data( 'field=Profile:' ) ) : ?>       <?php echo '
Profile: '; ?>       <?php bp_member_profile_data( 'field=Profile:' ); ?>     <?php endif; ?>      But when I add it to `groups/single/members.php` it doesn't return anything. Is there something special I need to add to make this function work in members.php? **UPDATE** The solution offered below works to get the profile data showing in on the group members loop, but it's showing the data of the last member for all members, I tried adding `<?php $user_ID = get_current_user_id(); ?>` and I also tried `<?php echo xprofile_get_field_data( 'Profile:', $bp->displayed_user->id ); ?>` but no change, how would I pass the relevant user ID into that function? Also, it seems the profile fields are only showing for logged in users.


title: If I want social media icons that link to my site's corresponding accounts, is that better to do with a plugin, or manually?

text: I feel like it's simple enough that coding it in would be beneficial, but I'm not sure.


title: How to Translate Contact Form 7 using qTranslate?

text: I'm using Contact Form 7 for my forms and also qTranslate to translate my website. I would like to translate all my fields and for that I used:               <!--:en-->First Name (required)<!--:--><!--:ru-->Фамилия (обязательно)<!--:-->      But it display this:               First Name (required)Фамилия (обязательно)      What should I use to make it work?


title: Force the_content() to show full post in RSS feed

text: I'm making a custom RSS feed where I want the full article to display. The problem is that when I use the_content() to output the article, it will only show the excerpt if there is a 'more' tag in that article. How do I force the_content() to output the full article, or is there another function that will achieve this?


title: Make theme editor to show all theme's files

text: Is there a way to make all files (also in subfolder) in my theme directory visible in the theme editor? I need a way to edit themes without having to upload a new one every time. Thanks!


title: Upload file inside plugins options page

text: I want to upload images in my custom plugin options page.               <form action="?page=slideshow_options" method="post">         <input type="file" name="async-upload" id="async-upload">         <input type="submit" name="html-upload" id="html-upload" class="button" value="Upload">     </form>      If I try to check wether submit button was clicked with isset I get some weird errors. How can I get it to call a function uploadimages() for example?


title: Permalinks break every day

text: I have critical problem! My Wordpress Blog has the permalink structure `/%category%/%postname%/`. **The problem is that very often the permalinks break so I get a lot of 404-Errors.** I can fix it refreshing the links by saving the permalinks options again in the admin panel. This seems to be a knows problem. I find out that some wordpress users got the same problem, but only one! After a refresh all works. For me it breaks after some hours again. Sometimes I noticed that while working on my blog and most times I noticed it by checking the links in the morning. That's why a lot of users leave the site after seconds, so sadly I loose a lot of traffic... **Further Informations** I activated the plugin `WP No Category Base`, this could be the problem. But on another blog this plugin worked for months without trouble. I can tell you everything about my server configuration (cheep virtual server from xenonserver.de) you need to help me. There is enough memory available. Installing a plugin, the install dialog freezes, so I waited some secs and then went back to the plugin overview. But every plugin is listed there and works fine.


title: Changing Header Image Every N Minutes/Seconds

text: I am trying to change the header image every "n" second/minutes. Have looked at a number of solutions on the web and am at present using the PHP code fragment below available at http://ma.tt/scripts/randomimage/: It still only changes the image on a page reload not every 'n' minutes. I have also seen the post at: How to rotate the header image per day? However, I do not know how to adapt it to do what I want. Could you please lend me some pointers on how to go about it as I am very new to PHP. Moreover, would this be better done in JavaScript of PHP? Thanks in advance.


title: How can I display a buddypress group name in the header.php so that it shows when viewing each single group?

text: I tried the code below but it doesn't do anything when place in the buddypress default header.php file. Ideally I'd like to have the group name display to the right of the logo in the bp default theme when visiting each group. Thanks for any help.               <?php bp_group_name(); ?>


title: I want to extend the current themes' single.php to display the meta fields of my CPT

text: I am developing a plugin, which registers a role, a CPT and some metaboxes. I am now at the point where I included as well a single-mycpt.php into my plugin. Here's my current issue: I can't simply assume they will be using twentyforteen, so I cannot copy paste that single and extend it to my needs. Is there an established best practice to retrieve and extend the currently used single.php of the currently used theme? At the moment I register* a copy of the single.php of my current theme, but I would love it to be generally more usable. *               /* Filter the single_template with our custom function */     function add_mycpt_template( $single ) {         global $wp_query, $post;              /* Checks for single template by post type */         if ($post->post_type == 'mycpt') {             if(file_exists(dirname( __FILE__ ) . '/templates/single-mycpt.php')) {                 $single_template = dirname( __FILE__ ) . '/templates/single-mycpt.php';             }         }         return $single_template;     }     add_filter('single_template', 'add_rechungs_template');


title: How to handle core code throwing notice on valid input?

text: I have combination of valid input with native WP function throwing PHP notice. In this specific case it is image without extension with `image_resize()`. This is usually suppressed by WP, but it still has me worried because it runs in feed and such things can explode XML to pieces. If I can neither change core or input then what should I do? I suppose I could try to explicitly suppress error output around there. Or should I just ignore the possibility as edge case?


title: wp_query with parameters

text: I have a custom search page via which I select:               One or ALL categories     One or ALL tags     One or ALL authors     A search string or no search string      On the results page, wp_query works when I have selected values. But how do I instruct to set some param as ALL? How do I set "search ALL categories" for example? Maybe I need to break my args and add to them only when I got values? But how would I do that? Thanks. # EDIT I modified the wp-query and now stands as follows. All works great but I do not have paging!               $args = array( 'order' => 'DESC', 'orderby' => 'date',  'posts_per_page'=> 10 );      if ( '0' != $category ) { $args['cat'] = $category; }      if ( '0' != $tag ) { $args['tag'] = $tag; }      if ( '0' != $author ) { $args['author'] = $author; }      if ( '' != $search ) { $args['s'] = $search; }      $the_query = new WP_Query( $args );     while ($the_query-> have_posts()) : $the_query->the_post();     ....     endwhile;     wp_pagenavi( array( 'query' => $the_query ) );


title: Making Comments Editable?

text: How would I make my WordPress Comments Editable? I tried using an Ajax plugin that take them to another screen, but it's not as nice as I would like. For example, I just want it to re-open the initial comment box and allow them to edit their comment for at least 30 minutes after a post.


title: Update field in Theme Customizer via Javascript

text: I am working with the Customizer and I have made some custom controls which is cool. Now I'm trying to create a relationship between two controls whereas the input of one control passes through some javascript, provides a result and updates another control input field. Lets say I have two controls called control_one and control_two BTW I found this post quite helpful, enabled me to grab the value of control_one. This saved a number of hours fumbling around. > Is it possible to get a theme customizer setting from wp.customize using > jquery? I can now do something with it in JS, and console.log the output. Which works great. Now I need to put the output back into control_two. But for the life of me I can't seem to do this. When I use firebug in firebox - I can punch in..               var steven = 65.4; // random number!     wp.customize._value.control_two(steven);      and the field updates, however inside my script this is not the case. My script looks something like this..               wp.customize('control_one', function(value) {         value.bind(function(color) {          // do stuff         var color = 'now_equals_this';              wp.customize._value.control_two(color);              });     });      I would appreciate a step in the right direction. Regards Steven


title: Add Option if Not Exists

text: I need to see if an option, and if does, get the value. If not, I need to add it. The Codex provides:               <?php     $option_name = 'myhack_extraction_length' ;     $new_value = '255' ;     if ( get_option( $option_name ) != $new_value ) {     update_option( $option_name, $new_value );     } else {     $deprecated = ' ';     $autoload = 'no';     add_option( $option_name, $new_value, $deprecated, $autoload );     }     ?>      Which supposedly **updates the option name myhack_extraction_length with the value 255. If the option does not exist then use add_option and set autoload to no.** However, it seems to me that the second half could be called in two ways, if the option does not exist OR if the new value==the option Is this correct?


title: Where does the uploaded image go?

text: add_action( 'customize_register', 'boilerplate_customize_register' );     function boilerplate_customize_register($wp_customize) {         $wp_customize->add_section( 'themename_color_scheme', array(             'title'          => __( 'Color Scheme (sect!on name)', 'themename' ),             'description'    => "This changes color scheme",             'priority'       => 135,         ));         $wp_customize->add_setting('themename_theme_options[image_upload_test]', array(             'default' => 'image.jpg',             'capability' => 'edit_theme_options',             'type' => 'option',         ));         $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'image_upload_test', array(             'label' => __('Image Upload Test', 'themename'),             'section' => 'themename_color_scheme',             'settings' => 'themename_theme_options[image_upload_test]',         )));     }      This adds a section in Theme customization page and in it, an image upload dialog. Where does this image go and how can I refer to it?


title: My first WP development project - am I envisaging this right?

text: I've been asked by my friend to recreate his travel site, CMS style, in Wordpress. His layout is something like this: Home   About Us   \-- Country landing page (with a featured tour, then links to the subpages below) \----- Tailor Made Tours landing page (landing page, then underneath, an overview of all tours in this country with "read more" links, each clicks thru to tour page)   \--------- Individual Tour page   \--------- Individual Tour page   \--------- Individual Tour page   \----- Group Tours landing page (landing page, hen underneath, an overview of all tours in this country with "read more" links, each clicks thru to tour page)   \--------- Individual Tour page   \--------- Individual Tour page   \--------- Individual Tour page   \----- Special Interest Tours landing page (landing page, then underneath, an overview of all tours in this country with "read more" links, each clicks thru to tour page)   \--------- Individual Tour page   \--------- Individual Tour page   \--------- Individual Tour page   \----- Hotels in this country landing page (landing page w/overview of all hotels in this country with "read more" links, each clicks thru to tour page)   \--------- Individual Tour page   \--------- Individual Tour page   \--------- Individual Tour page   Contact Us   Request a Brochure   Customer Care   There will be about 10 countries each with subsections as above. Each landing page would list all the individual tour pages, with a thumbnail image and a link to take you to the corresponding tour page. The tour and hotel pages would need to be added by his staff via the Wordpress dashboard/cms. I am only just familiarising myself with Wordpress development and this is the way I see it: \- each country landing page would be a static page with links to Group Tours, Special Interest Tours and Tailor made tours. \- each of those tour landing pages (Group Tours, Special Interest Tours and Tailor made tours) would list posts within a corresponding category, for example China > Group tours would list all posts categorised under "China group tours". \- This list would be formatted to include the tour posts' featured image and a link to read the full tour post \- Each tour page would be a post - it would have a dedicated layout with custom taxonomies for including things like price. It would have dedicated places for the cms user to assign photos. \- There would also be a category for "China featured tour" and the cms user could choose a tour for this category which would appear as the country landing page's featured tour. Is this the simplest way to go about doing that?? As I said, new to wp development, this would actually be my first project.. so just trying to get peoples input about how i'd go about it?? The actual site is here: www.sanyachinatravel.com


title: Making my plugin translation ready. Poedit not working

text:
I'm building a plug-in which is going great so far. I want to start making it localization ready. I don't know what is going wrong, but it's bugging out on me when I try to load it in Poedit. So let's do this step by step as multiple tutorials show me to. So in myplugin.php I load the following to tell WP where my language files are (after actually creating the folder).               function ap_action_init()     {     // Localization       load_plugin_textdomain( 'myplugin', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );      }          add_action('init', 'ap_action_init');      Then I adjust all strings that need translation in my file (which is in the admin folder).
<?php _e('MyPlugin Settings', 'myplugin'); ?>
     <?php _e('Element Width', 'myplugin'); ?>     <?php _e('This defines the default width of your Elements', 'myplugin'); ?>      So far so good, I would think. But then I open Poedit. I tell poedit to save the `myplugin-nl_NL.po` in the languages folder in my plugin. I tell the base path to be `../` And I tell my paths to be either `./admin` or `admin` (if I give it `/admin`, or something else, it gives me an error the folder doesn't exist. So I'm assuming it finds my folders). I tell poedit to look for the keywords `__()` and `_e()`. And then I press ok! Every single time (whatever I seem to try) It doesn't show me any strings to translate, where as I import a normal .po it does show me alot. So. Is anyone seeing where it's going wrong here? P.S: Maybe an important notice. If I try to manually create my own .po file, it does show me strings in POedit. But if I put this on my website and change WordPress it's language it doesn't change anything. So my guess is I'm doing something wrong in my WP files. Hope anyone can help :)


title: Customising wordpress search and using $_GET["s"]

text: My theme's `search.php` currently has a few "IF" statements to deal with the different types of search that my website uses. I have a site-wide search, a species (custom post type) specific search and an advanced species search. For the "species" search, I've simply added an input akin to `<input type="hidden" name="type" value="species" />`. This search uses a single input field to search my species custom post type. Users would likely opt to use this search if they were looking for the common or scientific name of a fish. For the "advanced species" search, I'm using 12 different inputs (pH, size, temp, etc). I'm building an $args array for `meta_query` in the `WP_Query` class with this data, i.e: `array( 'key' => 'genus', 'value' => $_GET["genus"] )` As a result however, the generic `<input name="s">` isn't being used, and as such, the form action isn't working (just loads the index page without searching). Is there a better way of doing this? I could obviously just send "s" as a hidden input with a generic value, but that's a cheap and ugly way of going about things. Maybe this should be a page separate to our search page? I'd prefer to do it in `search.php` though or there will be some redundant copying of HTML structure etc for no real reason. Thanks in advance,


title: Custom JSON feed rewrite

text: I'm trying to implement a feed of information from an Event custom post type in JSON format, to be used in a FullCalendar implementation, pretty much as described here. The one thing I wanted to change was to create an actual WordPress feed to generate the JSON output, to avoid the hack of looking for wp-load. This is the code: https://gist.github.com/1600619 I manage to get the valid output if I go to example.com?feed=json, but I think that the querystring is preventing FullCalendar from actually parsing it. I was hoping that having the feed with a proper URL like example.com/feed/json would fix it, but that gets me just a 404.


title: how to display the wordpress login and register forms on a page?

text: I have a wordpress site. Which has the built-in login form with the url http://domain/wp-login.php and register page http://domain/wp- login.php?action=register. As these pages have no sidebar and headers, therefore I want to display these forms on a page which I have created from the backend. Is it possible and how will I do this?


title: Wordpress multisite install on two subdomains, each belonging to a separate domain

text: I would like to do a WordPress Multisite install on two subdomains. I can't use the main domains as they both have other sites running on them. But when these two are done they will need to be redirected. Setup is:               new.site1.com -> will become site1.com when done     new.site2.com -> will become site2.com when done      Can I do this with this plugin or otherwise? The DNS looks like it screws up, saying it can't find NS####.new.site1.com. Or should I do a multisite in this case? I thought it'd be better for the client if there was a central admin so he doesn't have to log into two sites, but if it can't be done maybe I'll have to go with two sites.


title: Custom fields 'for' custom taxonomy?? Can someone explain why?

text: I'm implementing various custom taxonomies for my project and I came across the concept of custom fields for custom taxonomies, which baffles me. I though custom fields where just custom fields associated to posts and not a taxonomy. Can someone explain this relationship and how it is used? Thanks!


title: wp_get_attachment_image_src() with advanced custom fields returning empty

text: I am using the advanced custom fields plugin to upload images for an image gallery. I am attempting to retrieve the different sizes of images that are saved in the uploads folder and having problems. $image = wp_get_attachment_image_src(get_sub_field('image'), 'full'); When I echo out the results of this I get nothing. I know that the images are being saved as different sizes because I can see them in the uploads folder and the get_sub_field('image') is returning the proper image src. Is there anything else I need to do to get this to work?


title: Adding thumbnails independent of images in blog posts

text: Is it possible to add thumbnails to blog post listings independent of images in a blog post -- e.g. if there is no image in the blog post, can I add a thumbnail image?


title: How to make thumbnail images click into blog posts

text: How do I make it so the thumbnails in the list of blog posts on my blog are clickable, so that when the user clicks the thumbnail image, the blog post opens up? If it helps, this is the blog: http://wordfruit.com/blog


title: Need a function for changing saved post_date or post_date_gmt to relative time in wordpress

text: I am working on a plugin and want to change the default post date to something like 'posted one min ago' OR 'posted 1 hour ago', OR 'posted on month ago'.


title: How to generate CSS from a shortcode within a plugin

text:
I'm struggling to generate CSS 'on fly' from a shortcode that is within a plugin using class. Here is the shortcode function:               public function shortcode($atts, $content = NULL) {                  $data = shortcode_atts (                  array(                     'id'    => '',                     'img'   => '',                     'speed' => '5',                 ), $atts              );                  $id_tmp = $data['id'];                  $src = wp_get_attachment_image_src( $data['img'], 'full');             $image_url =  $src[0];                  return  '
' .do_shortcode($content). '
';         }      What I'm trying to do is to get the `id` and `image_url` values and put them into a CSS file to create something like:               #intro01 <-- THE ID SHORTCODE VALUE {             background: url(../images/fly.jpg <-- THE $image_url VALUE ) 50% 0 fixed;     }      This is a public (front-end) css.


title: User accounts: allow users login to cms and change ONLY their profile page?

text: We want to create profiles for individuals/companies which would allow them to login to the backend and adjust their profile. Is there any easy way to handle logins for hundreds of pages that only allow the user to see and edit their page rather than everyone elses pages as well? So essentially the admin of Wordpress would have access to everyones pages but the individual/company would only have access to their page - which they can then update. UPDATE: Sorry, I meant that an actual page would represent their profile. I guess forget the word profile for now - can a user login to the cms and only edit a page they have created? Therefore if a hundred people created a new page, I only want them to be able to edit their own page.


title: Convert shortcode into html form

text:
I want to convert this shortcode.               [list-style="one"]     a     b     c     d     [/list-style]      To ouput like this one (html form)

a

b

c

d


title: How to get a unique nonce for each Ajax request?

text: I've seen a couple of discussions about getting Wordpress to regenerate a unique nonce for subsequent Ajax requests, but for the life of me I can't actually get Wordpress to do it-- every time I request what I think should be a new nonce, I get the same nonce back from Wordpress. I understand the concept of WP's nonce_life and even setting it to something else, but that hasn't helped me. I don't generate the nonce in the JS object in the header via localization- I do it on my display page. I can get my page to process the Ajax request, but when I request a new nonce from WP in the callback, I get the same nonce back, and I don't know what I'm doing wrong... Ultimately I want to extend this so that there could be multiple items on the page, each with the ability to add/remove-- so I need a solution that will allow multiple subsequent Ajax requests from one page. (And I should say I've put all of this functionality into a plugin, so the front-end "display page" is actually a function included with the plugin...) functions.php: localize, but I don't create a nonce here               wp_localize_script('myjs', 'ajaxVars', array('ajaxurl' => 'admin-ajax.php')));      Calling JS:               $("#myelement").click(function(e) {         e.preventDefault();         post_id = $(this).data("data-post-id");         user_id = $(this).data("data-user-id");         nonce = $(this).data("data-nonce");         $.ajax({           type: "POST",           dataType: "json",           url: ajaxVars.ajaxurl,           data: {              action: "myfaves",              post_id: post_id,              user_id: user_id,              nonce: nonce           },           success: function(response) {              if(response.type == "success") {                 nonce = response.newNonce;                 ... other stuff              }           }       });     });      Receiving PHP:               function myFaves() {        $ajaxNonce = 'myplugin_myaction_nonce_' . $postID;        if (!wp_verify_nonce($_POST['nonce'], $ajaxNonce))           exit('Sorry!');             // Get various POST vars and do some other stuff...             // Prep JSON response & generate new, unique nonce        $newNonce = wp_create_nonce('myplugin_myaction_nonce_' . $postID . '_'             . str_replace('.', '', gettimeofday(true)));        $response['newNonce'] = $newNonce;             // Also let the page process itself if there is no JS/Ajax capability        } else {           header("Location: " . $_SERVER["HTTP_REFERER"];        }        die();     }      Frontend PHP display function, amongst which is:               $nonce = wp_create_nonce('myplugin_myaction_nonce_' . $post->ID);     $link = admin_url('admin-ajax.php?action=myfaves&post_id=' . $post->ID        . '&user_id=' . $user_ID        . '&nonce=' . $nonce);          echo 'ID        . '" data-user-id="' . $user_ID        . '" data-nonce="' . $nonce        . '" href="' . $link . '">My Link';      At this point I'd be _really_ grateful for _any_ clues or pointers in getting WP to regenerate a unique nonce for each new Ajax request... * * * UPDATE: I've solved my problem. The code snippets above are valid, however I changed the $newNonce creation in the PHP callback to append a microseconds string to ensure that it is unique on subsequent Ajax requests.


title: Adding link post format to theme and permalink to rss feed

text:
I have been in the process of adding the link post format to the thematic theme via a child theme. To be honest, this is the first time I have done any sort of theme work with WordPress. I have been able to change the title permalink to the link I am linking to and adding a symbol to the title so that there is a visual to someone to realize that there may be a different behavior. (Example post) Should I be using thematic's filters to push out these changes to the theme or should I be using WordPress's? Also, how do I add a permalink in the RSS feed so people can still comment on my site (much like Daring Fireball) I have been doing the following in `functions.php`:               /**      * Override the post title logic      */     function mikewillsthematic_thematic_postheader_posttitle() {         if (has_post_format('link')) {             $posttitle = '
';             $posttitle .= '∞ ';             $posttitle .= get_the_title();                $posttitle .= "
\n";         } else {             // Handle other post types.         }         return $posttitle;     }     add_filter('thematic_postheader_posttitle', 'mikewillsthematic_thematic_postheader_posttitle');          /**      * Override the RSS URL      */     function mikewillsthematic_rss_permalink($permalink) {         global $wp_query;         if($url = get_post_meta($wp_query->post->ID, 'post_format_data', true)) {             return $url;         }         return $permalink;     }     add_filter('the_permalink_rss', 'mikewillsthematic_rss_permalink');          /**      * Override the RSS title      */     function mikewillsthematic_rss_title($title) {              if (has_post_format('link')) {             $posttitle = '∞ ';                 $posttitle .= $title;         } else              $posttitle = $title;              return $posttitle;     }     add_filter('the_title_rss', 'mikewillsthematic_rss_title');      But I feel that this seems... excessive. Is there a better way?


title: Duplicate results are displayed in a custom plugin

text:
I'm building a custom plugin for a Wordpress project I'm building as it's quite a specific project, and there isn't an off the shelf plugin suitable for the task. On one page I want to list objects from the database (which is also a custom database table) in a table. There is currently one item in the database, and I can echo this fairly easily to the page without any issue. The problem occurs when I try to put this data in to a HTML table, so when there is more than one object in the database it can be presented properly. However, as I have said there is only one record in the database at this moment, but when I include this data in to a table it displays the same record twice. Here is my code:               <?php         global $wpdb;         $satrent = $wpdb->get_row("SELECT id, name FROM phones WHERE phonetype = 'satellite' AND rent = '1'", ARRAY_N);     ?>      And for the HTML table:                       <?php             foreach($satrent as $sr)             {             ?>
                  	                 <?php print $satrent[1]; ?>	                 View	                 Edit	                 Delete
         <?php         }         ?>      Have I missed something or done something wrong? Many thanks!


title: Change ul class="children" for wp_list_pages?

text:
Hello I'm using this code to print a list of Pages and Subpages:
     <?php wp_list_pages('title_li=&depth=2&child_of='); ?>
      It outputs:

Page 1

Page 2

Subpage 2a

Subpage 2b

Page 3

Subpage 3a

Subpage 3b

Page 4

      Is there a way to override the `<ul class="children">` for something else in the **functions.php**? like `<div class="container"><div class="container2"><ul>` and the closing to `</ul></div></div>` I was checking this example but I don't know how to apply it to my case... Any help appreciated, thanks!


title: Exclude custom post type from search by custom field value?

text: I've been unable to find anything on how to do this, or if it's even possible. What I want to do is not display results of search in custom post type "resources" on which "resource_usertype" (key) is not "Public" or "Students" or "Alumni" (values). Or maybe a better way to say it is to only display search results in which values of "resource_usertype" are "Public", "Students", or "Alumni".


title: Can't override template file in child theme

text: I have my WordPress installation running using a child theme based on a theme I have bought. The original theme has templates files in a template folder `/original_theme/template/testimonial.php`. I want to override one of the files inside this folder so I copied it to my child theme's folder `child_theme/template/testimonial.php`. As far as I understand the documentation on child themes this is the recommend way to apply changes to the template files. This works for the `header.php` file but not for the template file I want to override. Changes are ignored and even an empty file displays the correct content. Is there anything else I have to do?


title: Can I insert the feature image inside the content, after any paragraph?

text:
I want to display the feature image inside a post text, perhaps after the third or fourth paragraph (or any) into the_content. Searching the site I've found this code, by Amit:               add_filter('the_content', function($content)     {        $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );        $img = '';        $content = preg_replace('#(
.*?
)#','$1'.$img, $content, 1);        return $content;     });      Works like a charm, but I can't figure out how include the post_thumbnail after a defined paragraph (not only the second). Can anybody point me on the right direction? Thanks in advance!!


title: Is there a way to show different source feeds on individual pages?

text: As a freelance writer, I have a few outlets I write for routinely plus additional sites, and while I used to post my content manually, due to SEO concerns and logistical issues, I have been looking to modify my Wordpress install to pull posts of mine from my client websites and display the content as it is added. I'm not sure if this is a valid comparison, but essentially I want to use Wordpress like Mahara which seems to be built for you to post all types of content, like a digital potfolo, all in one place. Although I did try Mahara (http://demo.mahara.org/) for a short period, I ultimately went back to Wordpress because of the community and also the fact I'm used to using it for client projects and such. Thanks in advance for any assistance,


title: Need Help Creating a Multi-Step, Video-Guided Enrollment Site

text: I have a distinct idea, and the beginnings of some ideas of how to implement it, but I find myself already spiraling off into research tangents and side- paths that can't possibly be healthy, so I figured I'd admit my ignorance and ask for help. I'd like to craft a website whose primary elements are one (or possibly more, if that's easier) videos guiding you through an enrollment process, and then one or more pages dedicated to holding forms and downloads related to said enrollment. In essence, my original vision was a site with a guide video situated in the top-left or top-center, approximately 5 minutes long, that discusses the basic technical elements of enrollment along with some fuzzier stuff (e.g., important dates, information about the program, etc.). Below or beside that, there would be a multi-step "enroller"--e.g., a step to collect name/address/contact info, a page to download important documentation, a page to submit additional survey information, etc. Since the video relates to all these steps, I'd like the video to remain static while the user steps through the enrollment process. Furthermore, since there are several steps, I'd prefer the enrollment process to use a sort of (Previous Page) (Next Page) structure to keep the contents of each step simple--if they were all just listed out on a single "page," it would stretch too far vertically and draw the user away from the video. Finally, I'd like the video playing and the enrollment procedure to operate independently from one another. If the user finishes one step of enrollment and goes to the next, I don't want the whole page to refresh, reloading the video and making the user lose their place. I suspect that judicious use of iframes will be key here, but since the video's going to be hosted on Youtube, I am unsure if that might complicate things. Theme isn't very important, and I'm happy to get any number of plugins--even paid ones--to make it work. Since I've already gazed into a number of rabbit's holes with plugins and iframes and modifying PHP files, I figured it'd be wise to ask if there's a preexisting theme or template for this before I lose untold amounts of time learning everything from scratch, but the specifics of what I want are hard to search for. Thanks for any help you can give!


title: New blog created with Wordpress is not crawlable by sitemap software

text: I have a new blog at glowingstart.com (didn't want to add it to the question, but the domain is needed to verify that it can't be crawled by that sitemap- generating site) and I was trying to use this site http://www.xml- sitemaps.com/ to create a sitemap. I have created sitemaps for other sites there and it worked fine. But with this new site, I got an error. Is there some setting which prevents crawling that Wordpress has? Or what may be the reason for this? Thank you!


title: How do I assign this filter to a variable? (Appending php & markup to the_content)

text:
===I HAVE SOMETHING THAT WORKS NOW, JUST NOT CORRECTLY. PLEASE READ THE WHOLE POST, I AM GOING TO LEAVE IT ALL UP HERE BECAUSE OTHERS MAY BE ABLE TO BENEFIT FROM ME BUMBLING THROUGH THIS PROCESS!! I am using the Advanced Custom Fields plugin v3.1.5 (current as of this writing) and I have a problem that I just can't seem to solve. I have created a "field group" and it renders correctly on the post edit screen. The meta box is specifically for the author to enter affiliate links. I have included a true/false field at the beginning of the box, so if it is checked (returns true), then the meta box will display on the front end of the site. This actually works perfectly. I added my code:               <?php if(get_field('affiliate_checkbox')){ ?>

             Weedub Product Recommendations

                     <?php the_sub_field('label_affiliate'); ?>

                     <a href="<?php the_sub_field('link_affiliate'); ?>" target="_blank" alt="reference link" title="reference link"><?php the_sub_field('text_for_link_affiliate'); ?>

      This was added just after               <?php the_content(); ?>      and therein lays the problem. I have a plugin that appends a "sponsors box" to the end of the_content and that sponsor box displays BEFORE my affiliate meta box. I understand why this happens (generally) but I am absolutely CLUELESS as to how to get my code to be appended to the content instead of writing it in AFTER the content. I found the WordPress codex page that talks about the "the_content filter" but I just can't get it to work. I honestly don't even know how to start! Can I write this filter into my functions.php file and have it APPEND my code to the end of the_content and get it to display BEFORE the plugin's "sponsor box"???? I REALLY need help with this, I have thoroughly exhausted 3 full days working on this to no avail... Any and all help is appreciated, as I'm no php wizard, and I'm at my wits end -Aaron ===================EDIT=========================== I've got something working now, but it's breaking some other filters on the page... BUT ... it IS working, lol :               function weedub_affiliate_filter($content) {          print $content; if (is_single()) { ?>

             Weedub Product Recommendations

                     <?php the_sub_field('label_affiliate'); ?>

                     <a href="<?php the_sub_field('link_affiliate'); ?>" target="_blank" alt="reference link" title="reference link"><?php the_sub_field('text_for_link_affiliate'); ?>

                    add_filter( 'the_content', 'weedub_affiliate_filter', 9 );      I know that it isn't right according to WordPress, I have stumbled on a post written by Ian Stewart about 3.5 years ago: Here is the link It taught me how to make it work the incorrect way!! There are 2 comments below the post that attempt to say how to do it the right way, but the commenters assume you know what you are doing, lol. =============EDIT===================== Ok... I'm not getting any errors any more, which is phenomenal! but, scroll down towards the end of the page here: Just past END OF THE_CONTENT you will see that there is no data from the fields... I am pretty sure that it has something to do with this line: `if (is_single() && get_field('affiliate_checkbox') && get_field('affiliate_label')) {` but.. I'm not sure! Tim, you are awesome, we are getting REALLY close!


title: Is there a social members only login plugin for WordPress?

text: I'm totally new at WordPress and I'm setting up a site where I want members- only pages. But I also want my members to be able to login with there social network logins (Facebook, Twitter, OpenId, etc). If possible, I would also want to allow non-members to comment on public posts, but not view (and so not comment on) members-only posts. Is such a thing possible with WordPress and/or a certain (combination of) plugin(s)?


title: Handling custom taxonomies

text: I am redesigning my website and in the process I am also streamlining the way to navigate the content. Currently, my content is divided in default WP categories by content type and topics like this:   * Reviews     * Topic1     * Topic2     * Topic3   * News And that's all. News dont have any further hirarchy and that makes it quite hard for users to find related content. The solution I've thought involves use of WP's Custom Taxonomy feature. According to my plan, i'll be a making a new set of categories. The current ones will be named as 'Content Type' and the new ones will be 'Topics'. Author will have to select two categories with every post from these two sets: **Content Type:**   * News   * Review **Topic:**   * Topic1   * Topic2   * Topic3 With that issue solved, now I need something for users to navigate the content. As I am using Genesis, i'll make use of its two menus in header. One will show links different content types along with home and other usual buttons. While the secondary menu will show the topics. What I want help is with what happens when someone clicks those links. For content type links, i plan to use simple list of posts. But for topics, I want something advanced. I want a page which shows Topic name on top along with tabs for different content types filed under that topics. Something like this. Can you guys give me some pointers that how can I achieve this?


title: Add common Post Actions to Custom Meta Column

text: I've created a custom post section and removed all of the default items (title, editor, etc...) using add_action and added my own custom meta boxes. The Issue: Since i've removed the default Title box there's no way to get back into the post since it shows the custom meta box content in custom columns on the top level of the section: ![Custom Meta Column Display](http://i.stack.imgur.com/pKrmI.png) The Question: How do I add the "Edit | Quick Edit | Trash | View" options to the custom column like WordPress does by default with the Title? Code being used for section:               add_action('init', 'addchic_register');          function addchic_register() {              $labels = array(             'name' => _x('Addy Chicken', 'post type general name'),             'singular_name' => _x('Addy Chicken', 'post type singular name'),             'add_new' => _x('Add New', 'addchic item'),             'add_new_item' => __('Add New Convo Item'),             'edit_item' => __('Edit Convo Item'),             'new_item' => __('New Convo Item'),             'view_item' => __('View Convos Item'),             'search_items' => __('Search Convos'),             'not_found' =>  __('Nothing found'),             'not_found_in_trash' => __('Nothing found in Trash'),             'parent_item_colon' => ''         );              $args = array(             'labels' => $labels,             'public' => true,             'publicly_queryable' => true,             'show_ui' => true,             'query_var' => true,             /*'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',*/             'rewrite' => true,             'capability_type' => 'post',             'hierarchical' => false,             'menu_position' => null,             'supports' => array('')           );               register_post_type( 'addchic' , $args );     }      Meta boxes:               add_meta_box("addy_meta", "Addy", "addy_meta", "addchic", "normal", "low");               function addy_meta(){       global $post;       $custom = get_post_custom($post->ID);       $addy = $custom["addy"][0];       ?>       <input size="100" name="addy" value="<?php echo $addy; ?>" />       <?php     }      Thanks!


title: How can I add a custom column to the "Manage Categories" table?

text: I've done this with posts, but I can't find the proper way to reference the category table's columns. I'm trying to add a column titled "Image" to the table, so that when the table grid of categories is displayed, if there is a category image assigned to the category, it will appear in the grid. The first step for me is to determine the proper filter to address in order to insert the columb into the table. I've tried each of these to no avail...               add_filter('manage_categories_columns', 'myFunction', 10, 2);     add_filter('manage_category_columns', 'myFunction', 10, 2);          function myFunction($cat_columns)     {         $cat_columns['cat_image_thumb'] = 'Image';         return $cat_columns;     }


title: Determining What Content Gets Displayed

text: I'm looking into using Wordpress as a basic content management system. I'm quite confused about what determines what content gets displayed when and where. For a simple example, I installed a theme and now I see something like this at the bottom of my "page": _By admin on April 26, 2011 | Edit_ There's also a comment box down there and I didn't expect one to be there. It appears that all I have to do is edit my page.php file to change this behavior but I'm a little baffled as to why the content delivery is so tightly coupled to the theme. I can make these changes now but if I decide to install a different theme I'm back at square one. It seems I should just be able to change a few settings to determine if I want those items (above) displayed when I create a "page". I see there are many ways that content delivery is determined. Here's a quick list:   1. Settings within the Wordpress control panel. (Widgets, Menus, etc)    2. PHP code within your theme files.    3. Custom post types.    4. Plugins  So here's the question I've come to. Are there any simple rules or guidelines to help me determine what I might need to edit or customize when it comes to determining what gets displayed where?


title: Display types of posts in edit.php instead of All, Published, Scheduled and Draft

text: By default, the post list (edit.php) in the admin panel displays a couple of options. It looks like this: All (10) | Published (8) | Scheduled (1) | Draft (1) I want to change this to display different types of posts, either by a custom taxonomy or by category. What I want it to look like is this: Articles (5) | Releases (5) | Scheduled (1) | Draft (1) So, the default when opening the Posts list should only include posts marked as articles, while the posts marked as releases should be in another window. Is there any way to change this? I've been trying for a while, but can't figure it out.


title: How to change header image size in custom themes

text: I'm using WP 3.5 for a CMS for one of our clients. I need to have a bigger header image than 940 × 250 pixels, so I changed width and height parameters, but when I try to upload a new image, it still asks me to crop it. What am I doing wrong?                   $settings = array(         'width'                  => 1700,         'height'                 => 300,         'flex-height'            => true,         'flex-width'             => true,         'header-text'            => false,         'uploads'                => true,     );     add_theme_support( 'custom-header', $settings );


title: Looking for references to WordPress Popularity Statistics

text: I found a recent report putting WordPress at 10-15% of the Alexa Top 1 Million Sites. http://hackertarget.com/2011/03/web-tech-2011-report/ Do you have any references to other similar data or reports (not only Top 1M)?


title: post_class not working with css

text:
through the codex I read about how to use the post_class() function to create a css hook for styling the content. Here is the code I have, PHP:               <li class="<?php post_class();?>"> <?php the_title(); ?>
     <p class="<?php post_class(); ?>"> <?php the_content(); ?>
      However, the following CSS does not work, the styling does not change:               .category-blockquote {     color: green;     }      This is despite the codex saying you can prefix a category name with 'category-' in your CSS to hook onto that content. https://codex.wordpress.org/Function_Reference/post_class Any help on why my code is not working would be much appreciated. Thanks in advance.


title: Wordpress media manager multiple selection output

text: I'm trying to use media manager in metabox, and I need to use multiple select. I just have problem with doing output from that selection. I need element in metabox to hold all selected files urls. My code is here:               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: true         });         custom_uploader.on('select', function() {             selection.map( function( attachment ) {             attachment = attachment.toJSON();             $("#obal").after("<img src=" +attachment.url+">");             });         });         custom_uploader.open();     });     });      What's wrong with it?


title: Lists Top Authors by Most Recent Posts

text:
I'm trying to display a table format of the top authors listed by the most recent posts. It should display the author, its avatar, the date, and the title of the post (with a link). I have it listing the top authors along with the avatar. But it won't display the title of the post or the correct date. Here's what I have so far:               $uc=array();     $blogusers = get_users_of_blog();     if ($blogusers) {     foreach ($blogusers as $bloguser) {     $userpost = get_posts('showposts=1&author='.$bloguser->user_id);     $uc[$bloguser->user_id] = '';     if ($userpost) {       $uc[$bloguser->user_id]=$userpost[0]->post_date;     }     }     arsort($uc);     $i = 0;     foreach ($uc as $key => $value) {          $user = get_userdata($key);     $post_id= $user->postID;     $post_title= $user->post_title;     $post_date= $user->post_date;     $post_count = get_usernumposts($user->ID);     if ($post_count && $i < 10) {       $author_posts_url = get_author_posts_url($key);             ?>

                             <img src="<?php bloginfo ('template_directory'); ?>/images/authors/<?php print $user->user_login; ?>.jpg" onerror= "this.src='<?php bloginfo ('template_directory'); ?>/images/authors/default.jpg'" width="45" height="50">
<?php printf ("%s
", $post_id,$post_title)?>

By <?php print $user->display_name;?>

Posted <?php the_time(get_option('date_format'));?>

      <?php    }      $i++;     }     }


title: ecommerce plugin with "buy for a friend" feature

text: Does anyone know about any ecommerce plugin with a feature to send the purchase to a friend? I need that feature but I cannot find any around. I would appreciate any information on this.


title: Frontpage pagination issue with paginate_links() function

text: I'm using following snippet to output pagination:               // get the current page          if ( get_query_var('paged') ) {         $current_page = get_query_var('paged');     } else if ( get_query_var('page') ) {         $current_page = get_query_var('page');     } else {         $current_page = 1;     }          // structure of “format” depends on whether we’re using pretty permalinks     $permalink_structure = get_option('permalink_structure');     $format = empty( $permalink_structure ) ? '&page=%#%' : 'page/%#%/';          echo paginate_links(array(           'base' => get_pagenum_link(1) . '%_%',           'format' => $format,           'current' => $current_page,           'total' => $total,           'mid_size' => 4,           'type' => 'list'     ));      When I set permalink type to `http://wordpress/?p=123` and use static page for frontpage with pagination, I recieve wrong URLs like: `http://wordpress/&page=2` instead of: `http://wordpress/?page=2` If you navigate to `http://wordpress/?page=2`, links in pagination will be also wrong, because current URL with queries goes as a base, for example: `http://wordpress/?page=2&page=3` If I use any other permalink type with rewriting, everything works fine. I'm looking any solution for this snippet and frontpage pagination. Thanks in advance for any help. **UPDATE:** My main problem was a mistype at `&page=%#%` but actually i need `&paged=%#%` and i add condition with is_front_page() function to switch `&` to `?` for frontpage query.


title: jquery-ui-autocomplete not loaded

text: I am using Advanced Custom Fields for a registration form on Classipress and I have indicated that the Business Name, First Name, Last Name and Type of owner are required fields. However, when I test the registration form it allows me to skip all of those and go directly from password to captcha. I want those fields captured to assure myself that the businesses are legitimate for the use of the site since I can't always tell from the email address. A response I got in a classipress forum was the script 'jquery-ui-autocomplete is not loaded' and that I should check to see if cp_load_scripts had been modified. The response also said the coad I was looking for was "wp_enqueue_script ('jquery-ui-autoomplete'); I understand php only minimally and don't know where to begin looking for or adjusting any of this script. . . does anyone have a minute to explain what it is -- and where to look -- and perhaps why. . . thanks very much Unfortunately this is one of those places where a little knowledge is a dangerous thing -- but it isn't enough!


title: Problem with login form

text: I'm having a problem with the login form for a site I've inherited, wherein only certain users are sent to the correct page after logging in. On this site, users with accounts are allowed into a special area. These accounts are all normal WordPress user accounts with very limited access. In order to access this special area of the site, users must use a login form. The login form appears to be based on this code for customizing the wp-admin login:               <?php     if ( ! is_user_logged_in() ) { // Display WordPress login form:     $args = array(                'redirect' => admin_url(),           'form_id' => 'loginform-custom',           'label_username' => __( 'Username custom text' ),           'label_password' => __( 'Password custom text' ),           'label_remember' => __( 'Remember Me custom text' ),           'label_log_in' => __( 'Log In custom text' ),           'remember' => true            );            wp_login_form( $args );       } else { // If logged in:     wp_loginout( home_url() ); // Display "Log Out" link.       echo " | ";       wp_register('', ''); // Display "Site Admin" link.       }     ?>      from this page: https://codex.wordpress.org/Customizing_the_Login_Form The former web designer had changed the `admin_url()` bit to `site_url( '/foo/bar/ ' )` and the `wp_loginout( home_url() )` bit changed to `wp_redirect('/foo/bar' )`, and it worked just fine. I changed these to `site_url( '/foo/ '` and `wp_redirect('/foo/' )`. Just about everything works as you would expect. If you're already logged in and click our login link, you're kicked to `/foo/`. Problem is: if you're not already logged in, upon logging in you're still kicked to `/foo/bar/`. However, administrator accounts who log in here are correctly kicked to `/foo/`. So far, I've run `grep -rl "/foor/bar" /wordpress/site/path` to find any remaining references to this path, but they are all just buttons and hyperlinks. I'm fairly new at this; is there something obvious I'm missing?


title: How to display original unmodified thumbnail

text: I have uploaded a few images that are being used as thumbnails. I cropped them within WordPress to be square and focus on the subject of the image. I have also got a slider that is rectangular and shows one image at a time. At the moment the sliders displays each posts thumbnail which is square and modified. I was wondering how you can display each posts original uploaded image for the thumbnail and if this is even possible. This is all on the homepage. Any help and advice welcome.


title: linking to an svg through comments_popup_link

text: I want to remove the text in the comment section and replace it with svg which falls back to png. This is my code so far                    <?php comments_popup_link('<object type="image/svg+xml" data="images/comment.svg"></object>', '1 <object type="image/svg+xml" data="images/comment.svg"></object>',                  '%<object type="image/svg+xml" data="./images/comment.svg"></object>'); ?>      I don't see anything wrong with my code plus my i have chmoded the images folder and its contents to 777, any pointers would be great. I am very new to Wordpress theme development so please excuse me if this is trivial. thanks


title: Cannot save post meta data as Administrator in Wordpress

text: I have an wordpress installation at yogazoga.com with several custom post types. When i try to add meta data to posts through admin panel it simply does not work. See the post at: yogazoga.com/listing/yoga-collective/ , the contact details below the post content are all meta data and blank at the moment . Interestingly when i post it as an editor, it works fine, like on this page: yogazoga.com/listing/shari-ser/.


title: Post Size Limit

text: I am in the process of writing a very long post -- currently 8,500 words and around 40 images, with more to come -- and, all of a sudden, the preview doesn't work: It just shows empty content, with the header loading correctly. The symptoms are the same as described on this page, however I am not using any shortcodes. (Although, maybe that wouldn't matter: If the problem is with PHP's RegExp, then whether there are shortcodes or not, length will still be an issue.) Unfortunately, this is on a managed server, so I have no way of changing the PHP.ini file. As such, what are my options? If this is the likely cause, presumably the only thing I can do is split my post into several. Any other ideas?... Thanks :) EDIT: Using WP 3.2.1


title: How to make shortcodes parse in two different themes

text: I've got a mobile and a desktop theme for my website , but the shortcodes in my desktop theme are a lot more functional than the ones in my mobile theme, I use only the shortcodes in my desktop theme, but as expected, the shortcodes in my desktop theme don't parse in my mobile theme. I want some of the shortcodes in my desktop theme to parse in my mobile theme too. I've read that the `do_shortcode()` function does the trick but I don't know how to implement it in my mobile theme. Thanks!


title: Two Custom Post Types with Identical Articles Competing for the same Slug

text: I have created two custom post types, each with it's own slug. Each custom post type contains some articles with the same title. So ideally I would have . . customposttype1/mainarticle/ customposttype2/mainarticle/ Instead I get . . . customposttype1/mainarticle/ customposttype2/mainarticle2/ <\-- with the extra 2 on the end The permalinks are set to "postname". Any help would be appreciated.


title: After 3.5.1. upgrade, posts appearing on Site yet *NOT* in WP admin!

text: Upgraded to newest WP version yesterday and with that many of my posts disappeared from admin. However, they do appear fine online. If you go to link below, all posts on Projects section of site were previously IN admin. Clearly they exist somewhere, just not sure how to retrieve. I can see all associated keywords in admin (along w/ number of posts linked to keywords). http://tri-lox.com/projects/ Any ideas how this might have happen and how I can reverse? Pls help! Thanks.


title: How do I edit the htaccess file to optimize my website?

text: Hi I have tried to optimize my website energyshop.se for a cpl of days but I cant seem to get it done. This is how my .htaccess looks like:               Header unset ETag     FileETag None     # Hantera och redirecta användare till en gemensam error-sia     ErrorDocument 404 /psych/cgi-bin/error/error?404           # BEGIN Compress text files      <ifModule mod_deflate.c>       <filesMatch "\.(css|js|x?html?|php)$">         SetOutputFilter DEFLATE       </filesMatch>     </ifModule>     # END Compress text files           # BEGIN Expire headers      <IfModule mod_expires.c>     ExpiresActive On     <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|form)$">     ExpiresDefault "access plus 1 year"     </FilesMatch>     </IfModule>     # END Expire headers           # BEGIN Cache-Control Headers      <ifModule mod_headers.c>       <filesMatch "\.(ico|jpe?g|png|gif|swf)$">         Header set Cache-Control "max-age=2592000, public"       </filesMatch>       <filesMatch "\.(css)$">         Header set Cache-Control "max-age=604800, public"       </filesMatch>       <filesMatch "\.(js)$">         Header set Cache-Control "max-age=216000, private"       </filesMatch>       <filesMatch "\.(x?html?|php)$">         Header set Cache-Control "max-age=600, private, must-revalidate"       </filesMatch>     </ifModule>     # END Cache-Control Headers           # BEGIN Turn ETags Off      <ifModule mod_headers.c>       Header unset ETag     </ifModule>     FileETag None     # END Turn ETags Off           # BEGIN Remove Last-Modified Header      <ifModule mod_headers.c>       Header unset Last-Modified     </ifModule>     # END Remove Last-Modified Header          # BEGIN Gzip Compression     <ifModule mod_gzip.c>       mod_gzip_on Yes       mod_gzip_dechunk Yes       mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$       mod_gzip_item_include handler ^cgi-script$       mod_gzip_item_include mime ^text/.*       mod_gzip_item_include mime ^application/x-javascript.*       mod_gzip_item_exclude mime ^image/.*       mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*     </ifModule>     # END Gzip Compression          AddDefaultCharset UTF-8     DefaultLanguage sv-SE          # Force “File Save As” Prompt     AddType application/octet-stream .avi .mpg .mov .pdf .xls .mp4 .rar      But the problem is that when I run tests they still say that I containing ? to shorter, cleaner ones. Some of it works fine but not the big things as I mentioned. If i look me up uing a newly created php-file with only in it an then run it in a browser it actually tells me that (in two plaes): _SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate,sdch and _ENV["HTTP_ACCEPT_ENCODING"] gzip,deflate,sdch so i guess it is supported but I havent made the right code or something. Anyone that solved these kind o problems before?


title: Saving Meta Data within Custom Post Type

text:
I cannot figure out why these functions aren't saving the data for price and location while saving startdate and starttime. When I do print_r($custom) - I can see that [events_price] => Array ( [0] => ) is blank..                function event_detail_box_content( $post ) {         $custom = get_post_custom($post->ID);         $meta_sd = $custom["events_startdate"][0];         $meta_pr = $custom["events_price"][0];         $meta_lo = $custom["events_location"][0];              $meta_st = $meta_sd;              $time_format = get_option('time_format');              if ($meta_sd == null) { $meta_sd = time(); $meta_st = 0;}              $clean_sd = date("D, M d, Y", $meta_sd);         $clean_st = date($time_format, $meta_st);              echo '<input type="hidden" name="events-nonce" id="events-nonce" value="' . wp_create_nonce( 'events-nonce' ) . '" />';              ?>

Event Date<input name="events_startdate" class="tfdate" value="<?php echo $clean_sd; ?>" />

Event Time<input name="events_starttime" value="<?php echo $clean_st; ?>" />Use 24h format (7pm = 19:00)

Event Price<input name="events_price" value="<?php echo $meta_pr; ?>" />

Event Location<input name="events_location" value="<?php echo $meta_lo; ?>" />

         <?php         print_r($custom);      }             add_action ('save_post', 'save_events');             function save_events($post_id){              if ( !wp_verify_nonce( $_POST['events-nonce'], 'events-nonce' )) { return; }              if ( !current_user_can( 'edit_post')) return;              if(!isset($_POST["events_startdate"])): return; endif;              $updatestartd = strtotime ( $_POST["events_startdate"] . $_POST["events_starttime"] );         update_post_meta($post_id, "events_startdate", $updatestartd );               update_post_meta($post_id, "events_price", $POST["events_price"] );          update_post_meta($post_id, "events_location", $POST["events_location"] );       }


title: WordPress admin bar overlapping twitter bootstrap navigation

text: I am having an issue with the WordPress admin bar overlapping the twitter bootstrap (2.3.0) nav bar. I have tried this fix:               body.admin-bar .navbar-fixed-top {         top: 28px;     }          .navbar .brand {         color: #000 !important;         text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 30px             rgba(255, 255, 255, 0.125);         font-weight: bold !important;     }          .nav-container {         padding-left: 0;         padding-right: 0;     }          .nav-tabs, .nav-pills {         margin-top: -6px;     }          .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a         {         color: #fff !important;     }          #inner-header {         width: 100%;     }          input,textarea,select,.uneditable-input {         margin-bottom: 0;     }          .navbar-form,.navbar-search {         margin: 0 0 9px;     }          .navbar-search {         padding-left: 0;     }          #s {         width: 100px;     }      but alas it is still posing an issue. I am wondering what fixes are available?


title: Use full size images in a specific gallery

text: Thumbnails are displaying as 100px however the full size is 130px which is what I want. I want this only in one specific gallery. Also would like to link each gallery thumbnail image to an external url


title: Do you use css reset in your child theme

text: I am trying to make a child theme . I want to use the html5 reset from this website . http://html5doctor.com/html-5-reset-stylesheet/ Anyone here use the code ? Can you find me a child theme with lots of functions and codes. I've downloaded and doing research . I think i need to know more. Please give me a standard child theme(if you want to) I've to explore more. Waiting for your answer . Happy New Year . Thanks .


title: Basic password protection without using users and roles

text: I'm using WooCommerce, and want to be able to password protect products (or preferably whole categories if possible), but without using the Users & Roles functionality build into WP(because I need anonymous guests to be able to enter the password too). I've tried the standard post password protection build into WP, but all that does is block the product's description from showing up (i.e. the body of the "post"), but it doesn't stop you from seeing the product image, details, etc (and in fact you can still purchase the product too). I've gone down the road of writing something myself (basically I included a custom attribute in any page I wanted protected, and then customised the page template's PHP code to require a password before displaying the page, but my attempts (so far) aren't working 100% because they screw with the cart/checkout process (I think it's interrupting the posted form data or something). Any ideas? Thanks Dave


title: Published posts counter

text: I'd like to have statistics for the website. Is there is any snippet to allow WP admin in Dashboard to monitor how many posts published daily or monthly by other users ?