Dynamic settings fields with Settings API

I am at my first Settings API application and I hit a snag. In a submenu page, I need to generate a number of fields (say color picker) for each of the values retrieved from another setting. To be more precise, I created in another menu page a list of category checkboxes:               function bcio_fp_special_cats_display(){     $options = (array)get_option('bcio_options');     $categories = bcio_get_categories();          echo '
';          foreach($categories as $category){         $selected = ( isset( $options['fp_sp_category_'.$category->cat_ID] ) ) ? $options['fp_sp_category_'.$category->cat_ID] : '';                  if($selected){               echo '
<input type="checkbox" value="'.$category->cat_ID.'" name="bcio_options[fp_sp_category_'.$category->cat_ID.']" checked/>'.$category->name.'
';              } else {             echo '
<input type="checkbox" value="'.$category->cat_ID.'" name="bcio_options[fp_sp_category_'.$category->cat_ID.']"/>'.$category->name.'
';                     }                 }          echo '
';}      In my second options page, I use the option values to generate the appropriate fields in another settings section:               function bcio_special_section_settings_display(){     echo "These settings fields are generated based on your selection of Special Front Page Categories";     $options = (array)get_option('bcio_options');     $categories = bcio_get_categories();          foreach($categories as $category){         $selected = ( isset( $options['fp_sp_category_'.$category->cat_ID] ) ) ? $options['fp_sp_category_'.$category->cat_ID] : '';             $cat_id = $category->cat_ID;             if($selected){           add_settings_field(              'bcio_special_cat_'.$category->cat_ID,                               'Special Section:
'.$category->name,                        'bcio_special_section_display("'.$cat_id.'")',                   'business-cover-special-sections',              'bcio_special_sections_options'                          );                   }                }}     //The field itself      function bcio_special_section_display($cat_id){                  $special_options = (array)get_option('bcio_special_options');             $color =  ( isset( $special_options['color'] ) ) ? $special_options['color'] : '';             echo '<input type="text" name="bcio_options[color]" value="' . $color . '" class="bc-color-field" >';            }      This successfully generates the appropriate number of fields, applies the name of the category in the field label, but when I try to use the callback it messes up as the parameter $cat_id I pass in the field callback doesn't quite work as I thought it would. > Warning: call_user_func() expects parameter 1 to be a valid callback, > function 'bcio_special_section_display("12285")' not found or invalid > function name in /nas/wp/www/cluster-2598/businesscover/wp- > admin/includes/template.php on line 1237 I tried poking it in a few ways, but no luck and I really need to figure out a way to store options in association with category IDs without hardcoding the IDs themselves. Getting this to work the right way with the Settings API or some non-plugin solution is paramount. I have a version based on ACF by Elliot Condon but would rather not make the theme dependent on a 3rd party plugin. The settings in these fields would define LESS vars, logos and so on for the site's special sections. Any hints in the right direction would be much appreciated.


get_permalink returns default link

I hope you can help me. So I'm using `/%postname%/` as permalink structure, and my htaccess looks like this:               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /develop/sekai/     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /develop/sekai/index.php [L]     </IfModule>          # END WordPress      Hovewer, `get_permalink` function returns me the default permalink structure (`?page_id=x`), while menus are fine with their links. What should I do? Thanks for all!! :D


Extract a link in the_content()

I'm trying to improve a bookmarks manager/theme I've built (http://bookmarkie.waterstreetgm.org). Right now, each post is simply a link: `<a href="http://tumblr.everlane.com/page/4">Everlane Tumblr</a>.` ie: that one single link is the entire content of `the_content()`. Easy enough and works great. Next, I want to be able to get a screenshot of the site via WordPress.com's mShots. Problem is, I can't seem to extract that link from `the_content()` and feed it into the `<img src="">`. If that wasn't clear, here's what I'm trying to do:               <img src="http://s.wordpress.com/mshots/v1/the-link-extracted-from-the_content()/?w=1024" />      I've tried severalvariations on this:               $content = get_the_content();     $link = preg_match_all('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $content, $match);      But I can't achieve the basic task of extracting that link from `the_content()`. At the moment, I simply get a formatted link output. I can't find a way to grab the url instead of grabbing the whole link. Thanks for any suggestions.


How to sort post listing on a page using custom field value?

I need help in sorting lists of posts inside a static page by a custom field value. I'm currently using the code below but it is not sorting correctly.               <?php                 $postslist = get_posts('numberposts=15&order=DESC&meta_key=sorting&orderby=meta_value_number&tag='. get_post_meta($post->ID, 'Tag', true));                 foreach ($postslist as $post) :                     setup_postdata($post);                 ?>      Any help would be appreciated.


wp_update_post is not updating category

I am using this custom function to add a publish/unpublish button to the front end of my site for the users:                   if ('draft' == get_post_status ($post_id)) {                 $post = get_post($post_id,ARRAY_A);                 $post['post_status'] ='publish';                 wp_insert_post($post);                 }                       else if ('publish' == get_post_status ($post_id)) {                 $post = get_post($post_id,ARRAY_A);                 $post['post_status'] ='draft';                  wp_update_post($post);                 }      But, for some reason, the category of the post is changing to the parent category of the post instead of sticking with the actual category of the post. For instance, I have 5 categories with 1 parent, like so:               ParentCat      - ChildCat1      - ChildCat2      - ChildCat3      - ChildCat4      - ChildCat5      Each post from the front end is entered into one of the five categories. When I click the "Publish" button that I've created, it changes the category to "ParentCat" instead of keeping it as the child category. Anyone know how I can fix this?


How to Expand and Collapse Profile Groups on BuddyPress Profie Page

Here is the scenario: I would like the default appearance on a BuddyPress profile page to have the profile fields collapsed and only the profile group names visible and look like: PROFILE GROUP 1 PROFILE GROUP 2 PROFILE GROUP 3 In order to see the profile fields, a user would have to click on a specific profile group. The group would expand revealing the profile fields. If, for example, a user clicked on PROFILE GROUP 2, the page would look like: PROFILE GROUP 1 PROFILE GROUP 2 -Profile Field A -Profile Field B PROFILE GROUP 3 The expanded profile group would collapse if the user clicked it again. Has this been done before? Is there an existing plugin to implement it? What code do I need? Please respond soon.


Creating a Custom Post Type for Inserting Preset Content into Post & Pages?

In response to Mike Schinkel's comment (see below) on my post about how to pre-populate content (essentially using a content template)... > @Scott B I mean why did you support a file on disk rather than an place in > the admin? For multiple, have you considering created a "Sales Letter" > custom post type? No, but it sounds like a better solution. How would you do it and where would you store the choices for the content? (I assume you might have a few different types of content templates to offer.)


Creating a searchable A-Z listing of hundreds of companies/services

I am about to create a webbased guide. A guide that will list numerous of companies - their services, contact information and so on. And I need help coding this! I am using Genesis News Child Theme and I want the following (have looked into Custom Post Types UI and taxonomies but need to develop this further!). It is all really quite straight forward - you are looking for a product/serviece, you need to be able to evaluate if you should contact this company, if yes, you want to know who to call, what they are offering you. This is the information that need sto be POSSIBLE but not mandatory necessary to add to each post:   1. Company name (which should be listed as an A-Z list of companies   2. Company logo (I am thinking in the sidebar area but not necessary) linked to URL   3. Company text description   4. Company contact details (here it should be possible to add several contact persons - if there is one KAM for public sector, one for Production industry and so on)   5. TAGS - for what they are offering - these (or made in another way) need to be searchable. Let’s say that a company is looking for providers that sell a certain product/service, in a specific market, for their particular industry. This is key - how to make key word searchable making it possible for users to search for a shortlist of about 10 perfect match companies among maybe houndreds!   6. Customer references (this could simply be links to PDF:s, but need to be shown visibly)   7. A list of features/functions that can be ”marked”/”unmarked” (these are commonly asked for features/functions) to help select a solution best suitable for the company searching for it   8. Recent posts - a company will be able to add an article to the forum, these should be able to track here.   9. A rating system! Functionality/Price/User friendlyness/Service level (in order to be able to rate each company there needs to be a control system - either emailing us, logging in as a member, being forced to add name and contact number (thus making it possible for us to remove false identities) I tried to upload images to help show ideas about what I mean but I didn't make it. I need the perfect code to do this! Who can help me? Thank you!


Direct access to site when log in

Is possible to have a direct access to the site when log in? I mean, when you log in, you access to the WP editor page. I want that user of my site will directly forwarded to the site.


Does the 'cat' argument in query_posts fetch posts from subcategories as well as the given ID?

Hello friends I am new to wordpress. I have used query like this query_posts('cat=1,2,3') now If category 1 is parent of 2 and 3. then query_posts('cat=1') and query_posts('cat=1,2,3') will get same posts or not? or how can I manage If I want to include posts form subcategories.


Adding dynamic content to end_lvl in Walker Class

I'm trying to add unique content to the end of each dropdown (sub-menu). I've managed to edit the end_lvl function of the walker class to add the div to the end of each sub-menu, but now I'm lost on the next step: creating a conditional statement based on the parent-menu-id to echo different content. Any thoughts/suggestions? This is what I have (and I know its obviously not working because I'm trying to use the item array but with menu-parent-id). Clearly I don't quite understand this.               function start_lvl( &$output, $depth = 0, $args = array() ) {         $indent = str_repeat("\t", $depth);         $output .= "\n$indent
\n
";     }          function end_lvl( &$output, $depth = 0, $item, $args = array() ) {         $indent = str_repeat("\t", $depth);               if($item->menu-item-parent==37) {             $afterMenuContent = "Content";          }         $output .= "$indent
\n
" . $afterMenuContent . "
\n
";          }


Using require_once in a Plugin?

Whats the difference between these two code snippets, and which one should I use for a WordPress plugin?               require_once(dirname(__FILE__).'/inc/canagan_admin_functions.php');     require_once( '/inc/canagan_admin_functions.php' );      Thanks, Matt


draft_to_pending action doesn’t seem to fire

I have the action ‘draft_to_pending‘ set to fire on a custom post type. I assume that when the user clicks “Status » Edit” changes it to “Pending” and then clicks “Save Pending”, this action is suppose to fire, but it doesn’t seem to do so. Here is my code:               add_action('draft_to_pending','notify_email_rejected',99);          function notify_email_rejected($post){              $post_id = $post->ID;              $is_rejected = get_post_meta($post_id,'rejected_listing',true);              $owner_id = get_post_meta($post_id,'owner',true);         $owner = get_userdata($owner_id);              $to = $owner->user_email;              $headers = "From: HayForSale <admin@hayforsale.com>\r\n";         $headers .= "MIME-Version: 1.0\r\n";         $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";              $subject = 'Your listing was rejected at HayForSale.com';              $rejection = get_post_meta( $post_id, 'rejection_message', true );              $message = 'some html';              wp_mail($to, $subject, $message, $headers);     }


Where is the right place to store custom images?

I'm converting my old web project to WP and there are tons of book covers that aren't to be uploaded/managed by WP but by my own functions. Where is the right place to store such a kind of custom content? For sure it has to be a new folder but where? Maybe **wp-content/uploads/cover** or **wp- content/cover** ?


Present Color Schemes to Clients

i have created a theme that i would want to set as a demo for people to try. I would like to have a menu that has options where one can set a color or option to test it. Therefore, if somebody wants to check the blue scheme, they would click on "Colors->Blue" on the menu and the theme would turn to blue NOT GLOBALLY, but for the specific person, throughout the website. I suppose it's pretty obvious that sessions are needed for this one, as well as some handling of GET parameters with a script that sets the color option of the theme(or any other option). Since i am using the standard Wordpress API to set the theme options, i am wondering whether there is a way to hook an option. That is, instead of saving it to the dabatase, just pass it to the specific session, without having to change the code of my theme to adjust the option selection. Has anybody done it ? Is there anything that can help me with that or i just need to do it from scratch ? Thank you for your time !


Need help sorting "My Sites" Alphabetically

I have 40+ sites showing up in the "My Sites" page with more planned. Unfortunately WordPress doesn't sort them alphabetically, and that makes it a pain to move from site to site during routine updates and maintenance. I've tried adding               asort($blogs);      to wp-admin/my-sites.php, but that doesn't help either. And regardless, I'd rather do this using a filter in functions.php rather than modifying a core file. Making the issue even more complex is the fact that the list is split into four columns, and while a horizontal alphabetical ordering would be a huge improvement, vertical (by column) would be much, much better. I've been searching for answers for this for a while and coming up empty, so any help would be appreciated. (My PHP is pretty basic, so spelling out the answer would definitely be appreciated.)


Plugin Posts 2 Posts : problems with the 'position' field

I must be a bit slow, I still have problems with the position field in the Posts-2-Posts plugin. If I set a position to each connection in a given post (say 1, 2 and 3) I don't understand how to display these connections in this order. I thought this would do the job :               $xxx = new WP_Query( array(     'post_type' => 'author',         'p2p_orderby' => 'position',     'connected_order' => 'desc',     'connected_from' => get_the_ID()     ) );          It doesn't. The position field is just not taken into account at all, even if I remove the line « 'p2p_orderby' => 'position' ». What do I do wrong ?


Removing the default sidebar from admin panel

I would like to remove the default sidebar from my template, it is not needed and I do not want to confuse the user that will be using the admin panel. I have created my own sidebars that are a bit more descriptive to hold content throughout the site.


Translating a custom taxonomy

How do I go about translating custom taxonomy terms? I am essentially trying to allow authors to see the terms in English and let the subscribers see the terms in Spanish. I am not running a multilingual site in the sense that posts and such are translated, so plugins like qTranslate don't address my need. The closest thing I've seen is an old plugin called ZDMultilang which supports term translation (tags, categories and link categories). I've also found some solutions like this one - Change labels on 'Nickname' and 'Biographical Info' in user-edit.php:               add_filter( 'gettext', 'wpse6096_gettext', 10, 2 );     function wpse6096_gettext( $translation, $original )     {         if ( 'Nickname' == $original ) {             return 'Funny name';         }         if ( 'Biographical Info' == $original ) {             return 'Resume';         }         return $translation;     }      But a) it doesn't seem to be working on my site, and b) I'd need to add a conditional that checks the language the user has selected to view the site in (I suppose `get_bloginfo('language')`).


Taxonomy: Why 'with_front' => false DOES NOT WORK?

Seriously, why `'with_front' => false` does not work as it should be? It is supposed to remove TAXONOMY BASE NAME and my question is why it does not work? I just dont want the taxonamy base slug appear in my URL and codex says `'with_front' =>` false should help but it does not. Leaving the slug empty like `'slug'=> ''` generates 404 error.               register_taxonomy("tax_categories", array("products"), array(         "hierarchical" => true,         "label" => "Categories",         "singular_label" => "Category",         "show_ui" => true,         'update_count_callback' => '_update_post_term_count',         "rewrite" => array(                  'with_front' => false,                   'hierarchical' => true                   )         ));      This issue supposed to be fixed http://core.trac.wordpress.org/ticket/16807 Please help to understand that. Thank you.


Help me to understand wp_header() and wp_footer() functions

hi everyone please help me to understand the hook functions `wp_header()` and `wp_footer()` What does it mean hook functions and what to do


the_permalink() not working in a root installation

I hope someone can help me. I have a root installation of WP, but not as `index.php` (it's actually `news.php`). Consequently `the_permalink()` doesn't work, as the root of the website is a different page. Is there any way I can fix this? Perhaps something in the .htaccess that detects `?` in the URL and redirects to `news.php/?` etc. Thanks for any assistance, I'm a newb at WP!


Translate a string to a language with masculin/feminine nouns

So in english we don't have gendered nouns. It is always "a table" or "a desk" with no need to worry about it being "une table" or "un tableau" (french). So my question is that when working on the french .mo file, how does one translate a string such as : You can include a %s in a childtheme since the "a" depends on what the %s is?


Specific plugin for custom user information access?

I've been looking for a while now, but I couldn't find anything near to what I need. Maybe I'm not using the right keywords, that's why I'm asking it here. I need a plugin where the administrator is able to add custom information to users account. So when the specific user logs in he`ll be able to check the information. Let`s say for example, each user has a field called Project Status, the admin may set the value for this field to "Completed", "Incomplete", etc... I hope you guys may help me, and I appreciate any kind of help!!! Thanks


Collection of fields in a single post

It's possible to create custom post types and custom fields but, is it possible to create custom field collections? That is, groups of different fields as an entity (a dropdown, two images and a textfield)? https://drupal.org/project/field_collection In Drupal there's something like this: https://drupal.org/project/field_collection Screenshot: http://www.commonplaces.com/sites/commonplaces.com/files/images/blog/example- field-collection.png And I was wondering what's the closest thing in WP.


WordPress karma theme shortcodes not working

I have uploaded karma theme and, but due to some reason, images using timthumb are not displaying. My WordPress url is http://wordpressforpi.com/test/ in this page, second image does not shows up, if we try to see through firebug, image url for second image, it shows > http://wordpressforpi.com/wp- > content/themes/Karma/truethemes_framework/extended/timthumb/timthumb.php?src=http://wordpressforpi.com/wp- > content/uploads/2011/11/google-adwords-e1320816486813.jpg&h=145&w=275 I tried the same process on other server as well as on my local pc, works well. Can you please help me.


Show min and max taxonomy values

I'm trying to get the min and max values from a taxonomy, but my code is returning all taxonomies:               function get_years ($taxonomies, $args){     $hlterms = get_terms($taxonomies, $args);     foreach($hlterms as $term){         $term_taxonomy = $term->year;         $output .= $term->name;     } return $output;     }     $taxonomies = array ('year');     $args = array ('hide_empty'=>true);     $year = get_years($taxonomies, $args);     echo min(array($year));      What I'm doing wrong? Thanks! Daniel


Multisite for main in subdirectory, subdomain and subfolders (EN/ES)

I have a domain `<http://my-site.com>` and I want to restructure it, used to have a Drupal for the portal and numerous installations of WordPress in different subdomains. The hosting I have only allows me to access cpanel (limited) and ftp. What I want to do is a single installation of WordPress multisite for the main domain, subdomains and subsites, ie:               <http://my-site.com>       <http://blog1.my-site.com>       <http://blog2.my-site.com>       <http://blog2.my-site.com/blog3> or <http://blog3.blog2.my-site.com>     <http://blog2.my-site.com/blog4> or <http://blog4.blog2.my-site.com>      All these sites should be independent of each other (although they share the themes and plugins) What would be the easiest way to do this?   From what I've been looking on the internet, I found how to make the subdomains, but to make the installation of multisites only gives me the option of subfolders, which does not help. On the other hand, is it possible to do this without installing Wordpress on my root? It's simply for organizing files. That is:               <http://my-site.com> <- Access URL       </www/site/>         <- installation directory (/www is the root)      As it had before, in the root I had a `/www/index.html` what redirected to `/www/site/index.php`. Being this last the Drupal directory. This system doesn't help as it enters an infinite loop of redirects.


Organize uploaded media files

I have a blog with all media stored in a folder called **upload** (organize media was disabled), I've activate it to organize new uploads by date. **But how can i organize old files?** I want this because i need to migrate the site to a Wordpress MU site, and i need to have files organizated.


I need advice on how to structure the categories according to the layout i have

I'm seeking advice on how to structure the categories so it fits well my page structure: ![The page structure](http://i.stack.imgur.com/UWbw5.jpg) The main highlight is a single post and the secondary highlight boxes will probably contain a slides showing more than one post each, and the grid at the bottom will have four posts. I don't know how i can categorize that and still mantain a good category structure, or if using taxonomies is a choice or not. Or maybe tags... i'm kinda lost. If it counts, i'm extending the Starkers theme. Thank you. EDIT: For clarity's sake, here's the link to the html version: http://rgbinterativa.com/promundo


when does output of get_user_count turns into an array?

**question** WHEN does the integer output of get_user_count() turns into an array ? **background** The function get_user_count() in ms-functions.php returns an integer (it calls get_site_option('user_count') The function wp_version_check() in update.php stores this integer in $user_count on line 55 Directly after that on line 73 it calls this integer with $user_count['total_users'] **reason for asking** On my network admin pages I get the error: _`Warning: Illegal string offset 'total_users' in /opt/htdocs/html/wp- includes/update.php on line 75`_ So I need to understand where I need to look (probably something I did somewhere) see also: http://wordpress.org/support/topic/illegal-string-offset- total_users?replies=14#post-2893756


Can NextGEN Gallery be used to display a list of images passed to it? Is there another plugin that can do this? I'm somewhat new to WordPress. I've written some php code to display a set of images in a sidebar. (The set of images is stored in the meta for the single post shown on the page.) When the user clicks on any of the images in the sidebar, can I get NextGEN to display the images starting with the one clicked, just as if the user had clicked on an image in a gallery displayed by using [nggallery id=x]. Thanks. Mojo


Why does get_users suddenly return duplicates?

I'm having a hard time figuring this one out. I'm running a simple users query :               $args = array(         'role' => 'custom_role',         'orderby' => 'ID',         'order' => 'DESC',         'number' => 3     );     $users = get_users( $args );      And the resulting array has duplicate entries :               Array     (         [0] => stdClass Object             (                 [ID] => 11433                 [user_login] => peterpanpan                 [user_pass] => $P$B1SJOYhvsDRBGLU4hpr4zsdffJdDD.Y0                 [user_nicename] => peterpanpan                 [user_email] => **********@gmail.com                 [user_url] =>                  [user_registered] => 2011-11-29 14:20:46                 [user_activation_key] =>                  [user_status] => 0                 [display_name] => Peter Pan             )              [1] => stdClass Object             (                 [ID] => 11433                 [user_login] => peterpanpan                 [user_pass] => $P$B1SJOYhvsDRBGLU4hpr4zsdffJdDD.Y0                 [user_nicename] => peterpanpan                 [user_email] => **********@gmail.com                 [user_url] =>                  [user_registered] => 2011-11-29 14:20:46                 [user_activation_key] =>                  [user_status] => 0                 [display_name] => Peter Pan             )              [2] => stdClass Object             (                 [ID] => 10663                 [user_login] => dmartin                 [user_pass] => $P$BLFk4yteiCQnVbyXMbMy4jOpBbytw3/                 [user_nicename] => enfont                 [user_email] => **********@yahoo.fr                 [user_url] =>                  [user_registered] => 2011-11-09 14:03:49                 [user_activation_key] =>                  [user_status] => 0                 [display_name] => Deanmartin             )          )      In the example, $users[0] and $users[1] are exactly the same. In the database, there are no duplicates. This started to happen recently, and the only thing that has been added was the W3 Total Cache plugin (but why would it cause such a behavior?). I tried deactivating it, but the duplicates remain. Does anybody have a clue of what may be going on here ?


Load posts from external source if not found in database

I want to modify WordPress so that it requests content from a function if content is not found in the database. I want to edit the section of the code which requests and returns the post content from the database so that: if it does not find the content in the database, it calls and gets the content from my function, instead of returning null/not found. I am not sure where this section of the code is or how to go about changing it. I can write a set of functions which return the title/body/excerpt/tags/etc... when give the post id not found in the database. Please help me in finding who/where to make this edit.


Current class hook on generated list

I want to style a current state with CSS to indicate the page currently being viewed, but List category posts doesn't generate a class hook. All it would need is something similar to the solution posted here. How or where would I modify the plugin or request that the feature to be added? Thanks. UPDATE: I'm using eStore 2.9 with a combination of List-Category-Posts and Dynamic Widgets. They all work as expected, but neither List-Category-Posts nor any similar plugin allows me to list posts in a category AND generate a .current class for me to style with. So I'm left with trying to hack (possibly) the plugin to give me current class hook. And no it's not a homebrewed sidebar. I'd rather the >Menu option in the CP worked its magic. To recap what I want to achieve: the list-category-post plugin generates a list of links for a given category, like so:
Category Name

Apples

Oranges

Pears

      I want a .current class attached to either the li or a tag of the currently viewed page in the said list:
Category Name

Apples

Oranges

Pears


which table updated after logout?

I am working on wordpress in which on clicking logout button user will be logout using `<?php wp_logout(); ?>` function when I followed some guidelines on wordpress site I came to know that it actually delete all cookies but what about session and in database which table is updated , actually i am using buddypress to see currently active users i got this code for destroying cookies.               function wp_clear_auth_cookie() {         do_action('clear_auth_cookie');              setcookie(AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);         setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);         setcookie(AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);         setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);         setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);         setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);              // Old cookies         setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);         setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);         setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);         setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);              // Even older cookies         setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);         setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);         setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);         setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);     }      please help, thanks


Social Sharing / tell a friend plug but specify which URL to share

while there are plenty of social sharing / email a friend type of plugins i am looking for one that will let me place it on only 1 page and most importantly allow me to specify which URL (not necessarily the URL of the page the form/buttons are on) I would like to recommend. to explain: the site i am working on is selling an online course. when purchased, the thank you page will have an option to tell your friends about the course. so i don't want to share this "thank you page" i would like the user to share the home/sales page. is there a plugin that does this or do i have to roll my own? and if the latter, where should i start?


Can't Install Standard Plugins on a Local MAMP installation

I've tried to install two standard plugsins (wp-touch was one). I have a local installation under OS 10.6 and MAMP which otherwise seems to work fine. I select the zip file but get the error message: The uploaded file could not be moved to /Applications/MAMP/htdocs/blog/wp-content/uploads/2012/06. The directory didn't exist, so I created it. I've also changed all the directories to read/write. I still get the same problem. I'm a unix virgin and new to macs, so please be gentle with me.


How can I let users open the site for other visitors?

I'm a bit new to wordpress and php and I'm trying to create a site where users have the possibility to change the appearance of the index page for other visitors. This could perhaps be done with back-end access to a maintenance plugin but I want it to be more simple than that for the user. Basically just log in and then push a button to open the site. What would be the best way to achieve this? * * * **[Update]** > `#` Plugin name 'Name' => 'Maintenance Mode',   >  `#` Author of the plugin 'Author' => 'Michael Wohrer',   >  `#` Authot URI 'AuthorURI' => 'http://sw-guide.de/',   >  `#` Plugin URI 'PluginURI' => 'http://sw- > guide.de/wordpress/plugins/maintenance-mode/',   >  `#` Support URI: E.g. WP or plugin forum, wordpress.org tags, etc. > 'SupportURI' => 'http://wordpress.org/tags/maintenance-mode',   >  `#` Name of the options for the options database table 'OptionName' => > 'plugin_maintenance-mode',


the_tags only showing when logged in?

I'm trying to figure out why the_tags(); when used in the loop are only showing when I'm logged in to the site. I've never come across an issue like this before when developing themes. my code is now on pastebin: http://pastebin.com/cSJy5kyH As I said, the tags appear when logged in but only then. Am I missing a permission or some setting that has appeared in WordPress 3.2.1?


How to display html in a shortcode

How do you display or process HTML in a wrapped shortcode ? `[myshortcode]<div class="map"></div>[/myshortcode]` my shortcode code is               function myshortcode_sc($atts, $content = null) {     extract( shortcode_atts( array(         'col' => 'left',         ), $atts ) );          $output =  '
' . do_shortcode($content) . '
';            return $output;          }     add_shortcode("myshortcode", "myshortcode_sc");      is there another function at the return to allow for $output to process the HTML and not just display it as text ?


Adding code to the function file

I would like to move my large php functions out of the index or template files and into the function.php file. Would it be something like this?               function grab_code(???) {         ??? .= '
some HTML-PHP code I monkeyed together
';           return ????;     }     add_filter('???', 'grab_code');       Then in the template files i would add?               echo grab_code(???);      I found answers here that look close to what I am asking but the seem specific to a function.   Thanks.


Post submit using shortcode and init

I'm trying to find the best way to return errors to a page once a form submitted by using a shortcode. I'm adding a function to `init` such as -               add_action( 'init', 'contact_form_process_post' );          function contact_form_process_post() {         if( isset( $_POST['unique_hidden_field'] ) ) {             // process $_POST data here                  $errors = new WP_Error();                  if( empty( $_POST['full_name'] ) ) {                 $errors->add( 'invalid', __( 'Full name cannot be empty' ) );             }                  if( count( $errors->get_error_messages() ) == 0 ) {                 wp_redirect( 'some_url ');                 exit();             } else {                 // Return errors here             }         }     }      This works fine if there's no errors (i.e all fields are valid), but if some fields are empty it should return to the form with those errors. If they are valid it re-directs to a confirmation page. The problem is returning the errors from `init` to the content/shortcode. I can do it the following ways -   1. Redirect back to the page setting the errors in the URL (query vars)   2. Globalize a variable for the errors and use this in the shortcode   3. Filter `the_content` and add the errors   4. Store the errors in a session I'd rather the URL stays the same, so option one is out. Option two works but it feels slightly "dirty", along with option 3 which isn't great. Option 4 could work, though WordPress doesn't use sessions. This will be used for along with JS validation (or when JS is disabled). Maybe I'm missing an obvious way to do this? Any suggestions? Thanks!


Get first_name on hook user_register

I have created a plugin for saving user info. I have used a action hook `user_register`, but I don’t get the values of `first_name` and `last_name`. What wrong in my code?               add_action('user_register','user_sf_lead');     function user_sf_lead($user_id){          $user_info = get_userdata($user_id);            $fields = array (         'Name' => $user_info->ID,         'First_Name__c' => $user_info->first_name,         'Email__c' => $user_info->user_email,         'Last_Name__c' => $user_info->last_name,         'User_Name__c' => $user_info->user_login,       );          ......     }      I tried all possible method used to get user info. The value is always blank.


Add images functionality not working as wanted

![structure admin panel](http://i.stack.imgur.com/NPg8t.png) I achieved this structure in wordpress admin panel. I am using wordpress option api to save and retrieve data from option.php . All I want to do is on every click of add more image button one more browse image should appear so that I can upload as many images as I wanted and then all these images path should be stored in array in option.php after clicking save changes. (banner heading is working properly I am able to upload 1 image and retrieve it but I want to do it for multiple images). Any suggestions to make this work here is my code               add_action('admin_menu','register_menu');           function register_menu()      {          add_options_page('slider setting', 'slider settings', 'manage_options', __FILE__, 'build_options_page');      }           function build_options_page()       {?>

My Theme Options

Take control of your theme, by overriding the default settings with your own specific preferences.
                      <form method="post" action="options.php" enctype="multipart/form-data">                        <?php settings_fields('plugin_options'); ?>                        <?php do_settings_sections(__FILE__); ?>
                      <input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?>" />
</form>
<?php      }      add_action('admin_init', 'register_and_build_fields');      function register_and_build_fields()       {             register_setting('plugin_options', 'plugin_options', 'validate_setting');             add_settings_section('main_section', 'Main Settings', 'section_cb', __FILE__);             add_settings_field('banner_heading', 'Banner Heading:', 'banner_heading_setting', __FILE__, 'main_section');             add_settings_field('logo[]', 'Logo:', 'logo_setting', __FILE__, 'main_section'); // LOGO             add_settings_field('add_image', 'add image :', 'add_images', __FILE__, 'main_section'); // LOGO      }      function validate_setting($plugin_options)       {           $keys = array_keys($_FILES);            $i = 0;             foreach ( $_FILES as $image )             {   // if a files was upload               if ($image['size'])             {     // if it is an image                 if ( preg_match('/(jpg|jpeg|png|gif)$/', $image['type']) )              {                     $override = array('test_form' => false);            // save the file, and store an array, containing its location in $file             $file = wp_handle_upload( $image, $override );            $plugin_options[$keys[$i]] = $file['url'];                 } else {       // Not an image.                        $options = get_option('plugin_options');                        $plugin_options[$keys[$i]] = $options[$logo];       // Die and let the user know that they made a mistake.                              wp_die('No image was uploaded.');     }                   }   // Else, the user didn't upload a file.   // Retain the image that's already on file.                     else {     $options = get_option('plugin_options');                        $plugin_options[$keys[$i]] = $options[$keys[$i]];                      }                       $i++;             }             return $plugin_options;      }      function section_cb()       {           }           // Banner Heading      function banner_heading_setting()       {            $options = get_option('plugin_options');            echo "<input name='plugin_options[banner_heading]' type='text' value='{$options['banner_heading']}' />";      }      global $multi_file_upload;      function add_images()      {          $add_more="add more images";          echo $add_more;      }      function logo_setting()      {          $multi_file_upload.= '<input type="file" name="logo" />';          echo "$multi_file_upload";      }


Limit posts displayed to 2 specific posts

I'm using the Twenty Twelve theme. I have created a basic page. What I want to do is keep 2 only posts (that I select) on the page at all times. In looking at the code I think this is the section that needs edited:                       <?php /* Start the Loop */ ?>             <?php while ( have_posts() ) : the_post(); ?>                 <?php get_template_part( 'content', get_post_format() ); ?>             <?php endwhile; ?>                  <?php twentytwelve_content_nav( 'nav-below' ); ?>              <?php else : ?>      How can I change this code to limit only 2 posts that I choose?


Is there anyway to rewrite woocommerce-template.php?

I am trying to do some customizations on the woocommerce-template.php file but I fear it will be overwrite on the next update. I wonder if there is a way to rewrite a function from functions.php with another one loading my custom file. This is the function present within woocommerce:               public function include_template_functions() {         include_once( 'woocommerce-template.php' );     }      I wonder if there is a way to overwrite it or anyother way to do so.


Add next and previous post links on pages like category, tags or archive pages

I am trying to find a solution for getting next pages for category or tag page in WordPress, tried with `next_posts_link` and `previous_posts_link` in these pages, but it's not working. Same functions are working on post listing page for me Below is my code
                         <?php next_posts_link( 'Next Entries',3); ?>               <?php previous_posts_link( 'previous Entries'); ?>

                     <?php                       if(have_posts()) :                 $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;                  $args = array( 'post_type' => 'post', 'posts_per_page' => 3, 'paged' => $paged );                  $loop = new WP_Query( $args );                  $i = '1';                       while ( $loop->have_posts() ) : $loop->the_post();  ?>                       <?php if($i=='1' || $i%3 =='1') { echo '
';}  else { echo '
';} ?>
<?php the_time('M');  ?><?php the_time('j'); ?>

 <?php  $url = get_the_post_thumbnail($post_id, 'blog_thumb');                    echo $url; ?>

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

<?php the_excerpt(); ?><a href="<?php the_permalink(); ?>">[...]

                                     <?php $categories = get_the_category();                                      foreach($categories as $category) {                                         echo 'term_id ).'" class="button" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$category->cat_name.'';                                         }?>

                 <?php                  $i++;                  endwhile;                  else:                     get_template_part( 'content', 'none' );                          endif;                      wp_reset_postdata();           ?>


Secure Validation of wp_editor in Theme Options

So I just found this great WPSE thread about security for themes/plugins. It answered most of my questions but it was created before the new `wp_editor()` function was built. I have two TinyMCE editors on my Theme Options and I'm wondering whether I need to use `esc_html()` or `esc_textarea()` in a validation callback before saving the theme option. It seems to me that TinyMCE takes care of a lot of that stuff (as well as the Settings API security that's taken care of), but there's still not a lot of documentation out there about `wp_editor()`. Any resources and answers appreciated.


Will it break my site if I delete all transient records in wp_options table?

My site currently has an outrageous 500k+ transient records in the wp_options table. This causes the table to be crashed frequently and so be my site. I thought transient records will all expired after some time. I'm not sure which plugins are responsible and what went wrong yet. However, I don't want my site to crash frequently like this. The number of records in `wp_options` table has grossly increased to 200k+ a few weeks ago and now 500k+. Should I only delete the `%transient_timeout%` records - 200k+ of them at the moment? Any help would be greatly appreciated. **Updates on 16th July 2012** I actually took risk (I backed up my site first) by deleting all the transient records and my site's database hasnt' crashed ever since :) Thanks again, everyone!


Does WP always makes 301 redirection?

We rented a SEO specialist for our site, and he says that we have to do some changes in site structure before he starts his work. The first is, that now most pages have 301 redirection. For example:   * `mysite.com/2010/12/02/postname/?p=5500` is redirected to `mysite.com/2010/12/02/postname/`   * some posts are redirected from `mysite.com/2010/12/02/postname/?=12786` to `mysite.com/2010/12/02/another-postname/`   * some posts have redirection from `www.mysite.com/2010/12/02/postname/Mysite/?p=32123` to `www.mysite.com/2010/12/02/another-postname` I would like to know:   1. Why does it happen?   2. Is it a normal WP behavior?   3. How can I change it?   4. Is it really important to avoid this for good SEO?


Extend WordPress search to include user search

There is many a WordPress plugin out there that enhances WordPress search but I have yet to find a plugin that will add user search. Search Everything used to have the functionality but was removed when WP moved to version 2.8. I suspect this was due to the way WP changed how authors were stored. The reason why I'm after user search is because all users on the WP site are staff members with their own profile. We have an author page that lists all staff by surname that is separated by 20 members per page. If you only know the first name of a member of staff then trying to find that member is very hard. I want to extend WP search so you can simply enter a name and the corresponding member shows up. This site is an intranet so using an external search engine is out of the question. Just want to be clear that I'm wanting to search for users not search for posts by author. How can I get staff member search added?


Unix timestamp for post comment

Is there any function/code snippet to retrieve the unix time stamp of the comment on a post? The WordPress default function `comment_time();` returns the time of the post in 12hr format (not helpful).


Issue with front page navigation after upgrading to 3.4

I upgraded to WordPress 3.4 and am having an issues with showing a different amount of post on the first page versus the rest. The first page is still showing 5 posts but when I go to /page/2/ I'm getting a 404 error. I have pagination on the custom post type pages and author pages and it works just fine. This is only happening on the front page with the combination of all post types together. Here is my code that may help:               // For adding custom post types to the feed     if ( ( is_front_page() && false == $query->query_vars['suppress_filters'] ) || is_feed() ){             $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;             query_posts( array('post_type'=>array('post', 'gaming', 'entertainment', 'tech', 'breakroom', 'podcasts', 'off-grid'),'paged'=>$paged ) );         }          // different amount of post on front page then other pages                 $temp = $wp_query;                 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;                 $wp_query = null;                 $wp_query = new WP_Query();                 $wp_query->query(array(                   'post_type' => array('post', 'gaming', 'entertainment', 'tech', 'breakroom', 'podcasts', 'off-grid'),                   'post_status' => 'publish',                   'paged' => $paged,                   'posts_per_page' => 10,                   'caller_get_posts'=> 1.                 ));                      $max_first_page = 5;  // Show this many posts on front page                 $args = $wp_query->query;                 $posts_per_page = get_query_var('posts_per_page');                 $posts_to_skip = $posts_per_page - $max_first_page;                 if ($paged == 1) {                    $max_posts = $max_first_page;              $firstPageCheck = "yes";             } else {                    $max_posts = $posts_per_page;                    $args['offset'] = (($paged - 1) * $max_posts)- $posts_to_skip;              $firstPageCheck = "no";                 }                 query_posts($args);                 if ($wp_query->max_num_pages < ceil(($wp_query->found_posts + $posts_to_skip)/$posts_per_page))                   ++$wp_query->max_num_pages;                 $counter = 0;                      if ($firstPageCheck == "yes") {                   // front page here                 } else {                   // all other pages                 }


Possible to add another setting to 'Front page displays' setting for Custom Post Type

Let me set the scene: I have a CPT that will work on a multi-site installation and some of the sites will be in a different language. For example my CPT is `Case Studies` I would use a URL structure like: `/case-studies/%post_id%/%postname%/` but if the site language is different then `case-studies` is no longer that. In WP settings you can set a page as your posts page. This essentially sets the `front` to your permalink structure. What I want to do is add an extra drop down for my CPT that allows to set the front page for the posts of that CPT. Thus if the language is different then the permalink structure can match that language. ![Add setting here](http://i.stack.imgur.com/csDJb.png) So is it possible to extend the settings using the Settings API in the location shown in the above image? If yes then how would I do that? If no then where would be a suitable place to place my CPT setting? (Bonus points if you can provide some code samples)


Formatting of curly brackets array from WP database to get more readable output

E.g. when I want to edit something in my WP database, I get a headache, literally. Because I see something like this:                a:92:{s:47:"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:42:"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:35:"category/(.+?)/page/?([0-9]{1,})/?$";s:53:"index.php?category_name=$matches[1]&paged=$matches[2]";s:17:"category/(.+?)/?$";s:35:"index.php?category_name=$matches[1]";s:44:"tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?ta-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";}      I guess it's some kind of array, but my text editor cannot format that to something like this:               Array     (         [a] => apple         [b] => banana         [c] => Array             (                 [0] => x                 [1] => y                 [2] => z             )     )      how can this be done with the stored data in PW database? Is there some online tool for that or maybe some plugin for Sublime Text 2 or N++?


Decontruct serialized data array from wp_options

I'm trying to decontruct (and recreate) a serialized option value in wp_options called 'my_options' How would I build the array to recreate this option_value that currently exists for 'my_options'? update_option('my_options', ?) After the update, the wp-options table would hold this value for 'my_options':               a:3:{s:12:"my_widget-1";a:2:{ etc...


Client is using Softaculous to upgrade WordPress versions. How do I upgrade from the WordPress dashboard?

My client is using Softaculous for software upgrading. I tried upgrading from the WordPress dashboard and it wouldn't let me. Do I have to somehow "uninstall" Softaculous for this to work?


How to configure WordPress to handle 75,000 pages?

I have a large site that's using WordPress. We have 75,000 pages in the site so far, and it's performing well on the front-end. The issue is that if anyone on our team touches the page editor (wp- admin/edit.php?post_type=page), Apache eats up all the memory on the server. I've tried disabling all plugins, but that didn't work. I also tried debugging on our live server which a 4GB box... it still eats up all the memory and comes to a hault. On this install, we also have 20,000 posts. There's no issue loading those in wp-admin. Maybe we should move all pages to posts - that's going to cause an issue with permalink structure, though. Are there special settings or configurations I'm missing for a large WP site?


Filter "Your latest posts"

On the Reading Settings page I have clicked **_Your latest posts_** under **_Front page displays_**. I am wondering how I can filter the query that displays these posts before it gets to the loop. I have tried to use the **pre_get_posts** filter but that does not seem to have access to this query. Is there anyway to modify the posts being displayed on the front/home page by editing functions.php and not messing around with template files?


Get Page ID from Backend

How can i get a page ID from the Admin backend? I'm saving data into a metabox on a 'Page' post type, and I need to return that data on the page in another area. But $post->ID obviously dose not work... What will work? Thanks


Non-admin "revisions" to page affecting code on page

This is a bit of a strange problem. We have a membership site, and I noticed some of the inline:block images were getting messed up on some of the pages. Upon looking into the problem, I noticed in the revisions section of each page that users were somehow inadvertently revising the pages. The only difference between the original and the new page would be that each inline block tag was removed from divs, messing up our layout. Obviously users are not hacking in and removing tags from our layout, so it must be happening by accident. Any ideas? It seems to be random.


Is there a shortcut to change bulk BMP images to JPG images in a site?

Images in WordPress posts, as I understand, are uploaded manually. They are uploaded by default to `uploads` folder. A client of mine reported that, in one of his site, he uploaded all the images in BMP format. Now he realized the consequences of his mistake. He wants to make them JPG now. And there are 40-60 images there. With a photo editor I can change the images in uploads folder from BMP to JPG. But the problem is the database. I've seen that in `_postmeta` table images are stored with the **meta_key** `_wp_attached_file` with **meta_value** like `2011/01/canola2.jpg`. And the same image is also in `_posts` table with a detailed path as **guid** , **post_type** `attachment` and **post_mime_type** `image/jpeg`. So may be a similar things happen to the BMP images as well. So, along with the image file format changes in `uploads` folder how can I bulk edit the db to make them available only with a minor change in their format in database? Any SQL query? Or, do I have to do the big change manually, one by one?


home.php not loading

I have an issue where home.php won't load, so wordpress insists of using index.php to display blog posts. I created home.php by copying the entire content of index.php into home.php. Is there a way to force wordpress to load a specific template or what is the process involved in solving such a situation? (I use the roots.io theme if it makes any difference.)


How to change the markup created by menu item only on chosen items?

How to add a checkbox to the menu item in WordPress backend that says "Make this a Mega Menu Container"? In my mind it should look something like this (Photoshop draft): ![enter image description here](http://i.stack.imgur.com/V3A2t.png) And when the box is checked instead of adding another standard ul > li DOM element a div container is added instead? I have no idea how to approach this. I was planning to use walker to change the DOM for the menu, but how to "activate" the walker only for some menus - in this case the menus that I choose by that checkbox to be the mega menu?


PHP Code to Display Term URL & Name of a Post Under a Custom Post Type

I am featuring a post in my footer(outside the loop) from a custom post type and am using Advanced Custom Fields plugin to do so. This is the code I am using:
Featured Movie
     <?php query_posts(array(     'posts_per_page' => 1,     'post_type' => 'movies',     'orderby' => 'post_date',     'meta_key' => 'featured_movie',     'meta_compare' => '=',     'meta_value' => 1,     'paged' => $paged     )     ); ?>     <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

<?php the_post_thumbnail('full-thumbnail');?>

     "<?php the_content(); ?>"
     <?php endwhile; ?>     <?php wp_reset_query(); ?>      While that does exactly what I need it to, I also need some code in there that displays & links to the term(s) that are associated with whatever post being featured at the moment. However the code I have asks me to specify a taxonomy and I dont think that's the way to go as it's too limiting & I want to be able to pull from every post in the `movies` custom post type regardless of what taxonomies and terms they have. The code I have right now is               <?php   // Get terms for post      $terms = get_the_terms( $post->ID , 'genre' );      // Loop over each item since it's an array      if ( $terms != null ){      foreach( $terms as $term ) {     $term_link = get_term_link( $term, 'genre' );      // Print the name method from $term which is an OBJECT     echo '
' . $term->name . '
';      // Get rid of the other data stored in the object, since it's not needed      unset($term);     } } ?>      As you can see I had to specify `genre` as the taxonomy for the sake of having it show up on my site & for the sake of this example but I dont want to specify a taxonomy bc doing so leaves out every other taxonomy I have like `ratings` or `release date`. Sure I could put every single one of my taxonomies into the code to make sure they're all included but there has to be an easier way. Further, how do I make sure that every term associated with the post is displayed.


Display HTML only if Custom Field has a Value

I am working with a plugin called Advanced Custom Fields. I am looking for help with code for my custom post type template, which is displaying some repeater field data. I have HTML wrapping each sub-field. Sometimes there will be no value for one or more of the sub-fields. _How to NOT display the HTML that is wrapping the sub-fields, if no value exists for the sub-field?_ In the below code, the SPAN tag for the sub fields of "measurement" and "amount" should HIDE if no value exists for the sub-field. My code is as follows:               <?php          if(get_field('ingredients-list'))         {         echo '
';                  while(has_sub_field('ingredients-list'))         {         echo '
 ' . get_sub_field('quantity') . '  ' . get_sub_field('measurement') . ' ' . ' '. get_sub_field('ingredient_name') .' ' . get_sub_field('notes')  . '
';          }                   echo '
';     }         ?>


Repeatable Meta Fields Not Saving

Need some help from the community as i am new to the plugin development of WordPress. I like to create a plugin for WordPress where i need a repeatable fields. But whenever i am saving the post the fields are not saving. I am uploading the file to dropbox so that anyone can checkout the code. Here is the link - https://dl.dropboxusercontent.com/u/34202357/latest-news.zip And here is the code if anyone don't want to download the zip **latest-news.php**               define('WP_DEBUG', true);     define('WP_DEBUG_LOG', true);     define('WP_DEBUG_DISPLAY', false);     if ( WP_DEBUG ) {         define ( 'CLRDR_LN_VERSION', '1.3.5-'.time() );     } else {         define ( 'CLRDR_LN_VERSION', '1.3.5' );     }     define ( 'CLRDR_LN_DIR', plugin_dir_path(__FILE__) );     //define ( 'CLRDR_LN_URL', plugins_url().'/latest-news' );               /**      * Include files      *      * @since 1.0.0      */          if( is_admin() ) {              // Load admin code         require_once( CLRDR_LN_DIR.'includes/custom-post-type-helper-class.php' );              require_once( CLRDR_LN_DIR.'includes/post-types.php' );          }          require_once( CLRDR_LN_DIR.'includes/scripts.php' );      **post-types.php**               <?php          $latest_news = new Custom_Post_Type( 'Latest News Ticker',array('supports'=>array('title')) );            $latest_news->add_meta_box(             'Default News Items',             array(                 'custom_meta_fields' => array(                     array(                         'label' =>  'News Text',                         'type'  =>  'text'                     ),                     array(                         'label' =>  'Link',                         'type'  =>  'text'                     )                                )             ),             'default_meta_box'     );          $latest_news->add_meta_box(             'Ticker Display',             array(                 'custom_meta_fields' => array(                     array(                         'label' =>  'News Text',                         'type'  =>  'short-code'                     )                                    )             ),                       'side_display_settings',             'side'     );      **custom-post-type-helper-class.php**               <?php          class Custom_Post_Type         {             public $post_type_name;             public $post_type_args;             public $post_type_labels;                     /* Class constructor */             public function __construct( $name, $args = array(), $labels = array() )             {                 // Set some important variables                 $this->post_type_name       = strtolower( str_replace( ' ', '_', $name ) );                 $this->post_type_args       = $args;                 $this->post_type_labels     = $labels;                                // Add action to register the post type, if the post type doesnt exist                 if( ! post_type_exists( $this->post_type_name ) )                 {                     add_action( 'init', array( &$this, 'register_post_type' ) );                 }                      // Listen for the save post hook                 $this->save();             }                  /* Method which registers the post type */             public function register_post_type()             {                        //Capitilize the words and make it plural                 $name       = self::beautify( $this->post_type_name );                           $plural     = self::pluralize( $name );                      // We set the default labels based on the post type name and plural. We overwrite them with the given labels.                 $labels = array_merge(                          // Default                     array(                         'name'                  => _x( $plural, 'post type general name' ),                         'singular_name'         => _x( $name, 'post type singular name' ),                         'add_new'               => _x( 'Add New', strtolower( $name ) ),                         'add_new_item'          => __( 'Add New ' . $name ),                         'edit_item'             => __( 'Edit ' . $name ),                         'new_item'              => __( 'New ' . $name ),                         'all_items'             => __( 'All ' . $plural ),                         'view_item'             => __( 'View ' . $name ),                         'search_items'          => __( 'Search ' . $plural ),                         'not_found'             => __( 'No ' . strtolower( $plural ) . ' found'),                         'not_found_in_trash'    => __( 'No ' . strtolower( $plural ) . ' found in Trash'),                          'parent_item_colon'     => '',                         'menu_name'             => $plural                     ),                          // Given labels                     $this->post_type_labels                      );                                // Same principle as the labels. We set some default and overwite them with the given arguments.                 $args = array_merge(                          // Default                     array(                         'label'                 => $plural,                         'labels'                => $labels,                         'public'                => true,                         'show_ui'               => true,                         'supports'              => array( 'title', 'editor' ),                         'show_in_nav_menus'     => true,                         '_builtin'              => false,                     ),                          // Given args                     $this->post_type_args                      );                      // Register the post type                 register_post_type( $this->post_type_name, $args );             }                  /* Method to attach the taxonomy to the post type */             public function add_taxonomy( $name, $args = array(), $labels = array() )             {                 if( ! empty( $name ) )                 {                                // We need to know the post type name, so the new taxonomy can be attached to it.                     $post_type_name = $this->post_type_name;                          // Taxonomy properties                     $taxonomy_name      = strtolower( str_replace( ' ', '_', $name ) );                     $taxonomy_labels    = $labels;                     $taxonomy_args      = $args;                          if( ! taxonomy_exists( $taxonomy_name ) )                         {                             //Capitilize the words and make it plural                                 $name       = ucwords( str_replace( '_', ' ', $name ) );                                 $plural     = $name . 's';                                      // Default labels, overwrite them with the given labels.                                 $labels = array_merge(                                          // Default                                     array(                                         'name'                  => _x( $plural, 'taxonomy general name' ),                                         'singular_name'         => _x( $name, 'taxonomy singular name' ),                                         'search_items'          => __( 'Search ' . $plural ),                                         'all_items'             => __( 'All ' . $plural ),                                         'parent_item'           => __( 'Parent ' . $name ),                                         'parent_item_colon'     => __( 'Parent ' . $name . ':' ),                                         'edit_item'             => __( 'Edit ' . $name ),                                          'update_item'           => __( 'Update ' . $name ),                                         'add_new_item'          => __( 'Add New ' . $name ),                                         'new_item_name'         => __( 'New ' . $name . ' Name' ),                                         'menu_name'             => __( $name ),                                     ),                                          // Given labels                                     $taxonomy_labels                                      );                                      // Default arguments, overwitten with the given arguments                                 $args = array_merge(                                          // Default                                     array(                                         'label'                 => $plural,                                         'labels'                => $labels,                                         'public'                => true,                                         'show_ui'               => true,                                         'show_in_nav_menus'     => true,                                         '_builtin'              => false,                                     ),                                          // Given                                     $taxonomy_args                                      );                                      // Add the taxonomy to the post type                                 add_action( 'init',                                     function() use( $taxonomy_name, $post_type_name, $args )                                     {                                                                register_taxonomy( $taxonomy_name, $post_type_name, $args );                                     }                                 );                         }                         else                         {                             add_action( 'init',                                     function() use( $taxonomy_name, $post_type_name )                                     {                                                        register_taxonomy_for_object_type( $taxonomy_name, $post_type_name );                                     }                                 );                         }                 }             }                         private function default_meta_box( $meta, $custom_fields=array(), $data_id )              {                 // Begin the field table and loop                 echo '

	';                                                      /* Loop through $custom_fields */                 foreach( $custom_fields['custom_meta_fields'] as $field )                 {                                                                                $field_id_name  = self::uglify( $data_id )  . '_' . self::uglify( $field['label'] );                                                                      echo '' . $field['label'] . '	';                          //echo '' . $field['label'] . '<input type="text" name="custom_meta[' . $field_id_name . ']" id="' . $field_id_name . '" value="' . $meta[$field_id_name][0] . '" />';                 }                 echo '

|||	';                 foreach( $custom_fields['custom_meta_fields'] as $field )                 {                                                                                $field_id_name  = strtolower( str_replace( ' ', '_', $data_id ) ) . '_' . strtolower( str_replace( ' ', '_', $field['label'] ) );                                                                     echo '';                     echo self::input_fields( $field_id_name, $meta, $field,1 );                                              echo '	';                      }                 echo '-	+	';                 echo '

';             }                  private static function input_fields( $field_id_name, $meta, $field = array(), $repeatable=0 )              {                                 switch($field['type']) {                          // text                     case 'text':                         if($repeatable)                          {                             $i = 0;                             $html= '<input type="text" name="'.$field_id_name.'['. $i . ']" id="'.$field_id_name.'" value="'.$meta[$field_id_name][0].'" size="30" />
'.$field['desc'].'';                         }                         else                         {                             $html= '<input type="text" name="custom_meta['.$field_id_name.']" id="'.$field_id_name.'" value="'.$meta[$field_id_name][0].'" size="30" />
'.$field['desc'].'';                         }                     break;                          // textarea                     case 'textarea':                         $html= '<textarea name="custom_meta['.$field_id_name.']" id="'.$field_id_name.'" rows="4" width="100%">'.$meta[$field_id_name][0].'</textarea>
'.$field['desc'].'';                     break;                          // select                     case 'select':                         if($repeatable)                          {                             $i = 0;                             echo '<select name="custom_meta['.$field_id_name.']['. $i . ']" id="'.$field_id_name.'">';                             foreach ($field['options'] as $option) {                                                         echo '<option', $meta[$field_id_name][0] == $option['value'] ? ' selected="selected"' : '', ' value="'.$option['value'].'">'.$option['label'].'</option>';                             }                             echo '</select>
'.$field['desc'].'';                              }                         else                         {                             echo '<select name="custom_meta['.$field_id_name.']" id="'.$field_id_name.'">';                             foreach ($field['options'] as $option) {                                                         echo '<option', $meta[$field_id_name][0] == $option['value'] ? ' selected="selected"' : '', ' value="'.$option['value'].'">'.$option['label'].'</option>';                             }                             echo '</select>
'.$field['desc'].'';                              }                                                                    break;                                                }                      return $html;                  }                       /* Attaches meta boxes to the post type */             public function add_meta_box( $title, $fields = array(), $boxtype = NULL, $context = 'normal', $priority = 'default' )             {                 if( ! empty( $title ) )                 {                                        // We need to know the Post Type name again                     $post_type_name = $this->post_type_name;                                          // Meta variables                        $box_id         = strtolower( str_replace( ' ', '_', $title ) );                     $box_title      = ucwords( str_replace( '_', ' ', $title ) );                     $box_context    = $context;                     $box_priority   = $priority;                                      // Make the fields global                     global $custom_fields;                           $custom_fields[$title] = $fields;                                             add_action( 'admin_init',                             function() use( $box_id, $box_title, $post_type_name, $box_context, $box_priority, $fields, $boxtype )                             {                                                add_meta_box(                                     $box_id,                                     $box_title,                                     function( $post, $data )                                     {                                                                            global $post;                                                                                // Nonce field for some validation                                         wp_nonce_field( plugin_basename( __FILE__ ), 'custom_post_type' );                                                                            // Get all inputs from $data                                         $custom_fields = $data['args'][0];                                                                                // Get the saved values                                         $meta = get_post_custom( $post->ID );                                              // Check the array and loop through it                                         if( ! empty( $custom_fields ) )                                         {                                             switch($data['args'][1]) {                                                      case 'default_meta_box':                                                     self::default_meta_box( $meta, $custom_fields, $data['id'] );                                                 break;                                                      case 'side_display_settings':                                                     echo '

[clrdr_latest_news id="'.$post->ID.'"]

';                                                 break;                                                      default:                                                     /* Loop through $custom_fields */                                                     foreach( $custom_fields['custom_meta_fields'] as $field )                                                     {                                                                                $field_id_name  = strtolower( str_replace( ' ', '_', $data['id'] ) ) . '_' . strtolower( str_replace( ' ', '_', $field['label'] ) );                                                                                echo '' . $field['label'] . '<input type="text" name="custom_meta[' . $field_id_name . ']" id="' . $field_id_name . '" value="'. $meta[$field_id_name]. '/>';                                                     }                                                 break;                                             }                                                                                }                                          },                                     $post_type_name,                                     $box_context,                                     $box_priority,                                     array( $fields, $boxtype)                                 );                             }                         );                 }                    echo "
";                          //echo $this->post_type_name;                     //print_r($custom_fields);                     foreach($custom_fields as $title=>$fields )                     {                                                    // Loop through all fields                         foreach( $fields['custom_meta_fields'] as $field )                         {                             $field_id_name  = strtolower( str_replace( ' ', '_', $title ) ) . '_' . strtolower( str_replace( ' ', '_', $field['label'] ) );                                   print_r($fields);                             echo $field_id_name."
";                                  //update_post_meta( $post->ID, $field_id_name, $_POST['custom_meta'][$field_id_name] );                         }                          }                 echo "
";                       }                            /* Listens for when the post type being saved */             public function save()             {                 // Need the post type name again                 $post_type_name = $this->post_type_name;                                  add_action( 'save_post',                     function() use($post_type_name )                     {                         // Deny the wordpress autosave function                         if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;                              if ( ! wp_verify_nonce( $_POST['custom_post_type'], plugin_basename(__FILE__) ) ) return;                              global $post;                                                 if( isset( $_POST ) && isset( $post->ID ) && get_post_type( $post->ID ) == $post_type_name )                         {                             global $custom_fields;                                                        // Loop through each meta box                             foreach($custom_fields as $title=>$fields )                             {                                                            // Loop through all fields                                 foreach( $fields['custom_meta_fields'] as $field )                                 {                                     $field_id_name  = strtolower( str_replace( ' ', '_', $title ) ) . '_' . strtolower( str_replace( ' ', '_', $field['label'] ) );                                           update_post_meta( $post->ID, $field_id_name, $_POST['custom_meta'][$field_id_name] );                                 }                                  }                         }                     }                 );             }                  //add_action('save_post', 'save');                  public static function beautify( $string )               {                   return ucwords( str_replace( '_', ' ', $string ) );               }                    public static function uglify( $string )               {                   return strtolower( str_replace( ' ', '_', $string ) );               }                    public static function pluralize( $string )               {                   $last = $string[strlen( $string ) - 1];                        if( $last == 'y' )                   {                       $cut = substr( $string, 0, -1 );                       //convert y to ies                       $plural = $cut . 'ies';                   }                   else                   {                       // just attach an s                       $plural = $string . 's';                   }                        return $plural;               }            }          ?>      **scripts.php**               <?php          function clrdr_lnt_admin_scripts( $hook ) {              if(is_admin()) {                  wp_enqueue_script('jquery-ui-slider');                    wp_enqueue_script('custom-meta-js', plugins_url('js/custom.js', __FILE__));         }                 }          add_action( 'admin_enqueue_scripts', 'clrdr_lnt_admin_scripts' );      **custom.js**               jQuery(function(jQuery) {       jQuery('.repeatable-add').click(function() {           field = jQuery(this).closest('tr').clone(true);             fieldLocation = jQuery(this).parents('tbody tr');           jQuery('input', field).val('').attr('name', function(index, name) {                          return name.replace(/(\d+)/, function(fullMatch, n) {                                return Number(n) + 1;               });           })           field.insertAfter(fieldLocation, jQuery(this).closest('td'))           return false;       });            jQuery('.repeatable-remove').click(function(){               if ((jQuery(this).parents('tbody tr').siblings().andSelf().length)!=2)         {             jQuery(this).parents('tr').remove();               return false;           }     });            jQuery('.sortable-form-table tbody').sortable({           opacity: 0.6,           revert: true,           cursor: 'move',           handle: '.sort'       });       });       Thanks to all in advance.


Irregular TTFB and server wait time response

im having a hard time figuring this out. I've created a custom wordpress theme from scratch, following the best practices that I could. The site works great most of the time, with a load time that feels okay considering implementation of a lot of frontend stuff (typekit, youtube embed, vimeo, jquery etc). The problem is before the frontend ressources load. Sometimes a get a Waittime in the server response time that goes up to around 8-10 seconds, while being around 700ms most of the time. This makes it Extremely hard to test and troubleshoot. So the problem either lies in the server settings, or in my php code. Since its not happening all the time, I think i can conclude that its not the code, since its the same code running all the time, and therefore should have been slow all the time - but maybe thats a hasted conclusion. ![enter image description here](http://i.stack.imgur.com/b3v2g.png) Im really looking to get some input on how to further test this, or hear about any experience with irregular server wait time and TTFB. The website is currently in testmode at wm.minnie.mico.dk Note: Ive been through disableing plugins, but again that should have made it slow ALL the time right? also - im not caching at the moment, since I need to fix this issue first.


WordPress Child Theme - twentyeleven

This is my first attempt at creating a child theme based off the WP twentyeleven theme. To begin with, I am using MAMP on my mac and have the following directory structure:                applications/MAMP/htdocs/mysite/wp-content/themes/twentyeleven/style.css                                                       /mytwentyeleven/style.css      My URL in my browser appears as: `http://localhost:8888/mysite/` My problem/query is, when I activate my theme within WP 3.2 and then go and view it, there is no style been applied at all and the header and footer don't appear either. Based on my directory structure above, I am thinking my style.css within my mytwentyeleven directory is not importing original parent twentyeleven style.css file. I think my import path is wrong or perhaps something else. Again, this is my first time at creating a child theme. Here is my child theme style.css file contents:               /*     Theme Name: MyTwentyEleven Theme     Author: Me     Description: My TwentyEleven Child Theme CSS     Template: twentyeleven     */     @import url("../twentyeleven/style.css");      Can people please let me know what I have missed as the import url path is not working as from the looks of it, it's not finding the parent twentyeleven style.css file. Not sure if it's a MAMP thing but I just can't seem to see why it's not working/finding correct path back to parent stylesheet file. Thanks


Select query with two and two related taxonomies

is this possible for 2 taxonomy and 2 terms                $querystr = "      SELECT *      FROM $wpdb->posts      LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)      LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)      LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)      WHERE $wpdb->posts.post_type = 'shows'      AND $wpdb->posts.post_status = 'publish'      AND $wpdb->term_taxonomy.taxonomy = 'location'      AND $wpdb->term_taxonomy.taxonomy = 'genre'      AND $wpdb->terms.slug = 'california'      AND $wpdb->terms.slug = 'comedy'      ORDER BY $wpdb->posts.post_date DESC      LIMIT 10      ";          $pageposts = $wpdb->get_results($querystr, OBJECT);          if ($pposts):          foreach ($pposts as $post):     setup_postdata($post);          the_title();     echo '<br'>;     the_content();          endforeach;     endif;      i tried putting this code above but the doesnt display anything; I want to display posts that has 2 term name and 2 taxonomy like for example: sampleposts [showlocation_tax][genre_tax] showlocation_tax has terms -california -LA while genre_tax - comedy - fashion what i want to do is i want to show all post for example: posts from california with comedy shows something like that i will really appreciate your help a lot


WordPress Multisite with multiple domains using Nginx

I'm growing grey hair here. I've tried so many things and yet I can't get a grasp on how to set this up. Found tons of guides but no one goes through all aspects, which are:   * A single WP Multisite install that handles several domain based (8 to be exact) sites   * Site running on Nginx Following this guide (https://www.digitalocean.com/community/articles/how-to- configure-single-and-multiple-wordpress-site-settings-with-nginx), I've set up a server (Ubuntu 10.3) with everything installed and being able to run the WP install through the default sites-enabled config. But as I apply the configs in the tutorial I come to a halt. This is my current setup http://pastebin.com/6iSK4H1M In the tutorial under the example.conf, root is set to point to a directory which I assume will be the same for all sites ("example" dir being the WP install). If I run the default IP / localhost I can access and login to the WP install. But as I add a domain under sites-enabled (and remove the default config) I just get a notification that the site can't be displayed. Have made sure to clear dns caching. In WP admin, I've created a new site and set it as a subdomain with a wildcard (*.example.com), and applied this to wp-config.php -               define('WP_ALLOW_MULTISITE', true);     define('MULTISITE', true);     define('SUBDOMAIN_INSTALL', true);     define('DOMAIN_CURRENT_SITE', 'localhost'); // Does it matter if I put localhost or IP here?     define('PATH_CURRENT_SITE', '/');     define('SITE_ID_CURRENT_SITE', 1);     define('BLOG_ID_CURRENT_SITE', 1);      And - is a domain mapping plugin really mandatory to get this to work? Any help would be greatly appreciated!


Create a page that automatically redirects to latest post of a specific tag/category?

I'm looking to make a URL like for example:               http://localhost/latest-news      Where the page for `latest-news` will automatically redirect to the latest news article (article with `news` category tag). I then will need to use the link /latest-news in a few different places (menu, and a slider on the front page).


How to get correct URLs in network wide menu (Multisite)?

I'm using this function to switch to my main website's navigation and display it on all sub sites in my multisite network. Ideally the links should have the following format: http://www.mysite.com/navigation-link but on the sub-sites the urls are http://www.mysite.com/subsite/navigation- link Obviously these pages don't exist so it's just showing a blank page. Any idea how I could make sure the urls are like the first example and how I might incorporate that into my function? function wp_multisite_nav_menu() {                   global $blog_id;              $args = array(                 'menu' => 'Main Menu',                 'theme_location' => 'main-nav'                  );              $main_blog = 1;               $main_blog = absint( $main_blog );                   if ( !is_multisite() || $blog_id == $main_blog ) {             echo wp_nav_menu( $args );             return;         }              else {              switch_to_blog( 1 );              echo wp_nav_menu( $args );              restore_current_blog();              }          }


Batch users creation

I would like to share a document with about 140 users after password authentication and I want to avoid to create manually all the 140 accounts. Is it possible to create them quickly? **UPDATE** : usernames to add are stored into a text file. The question is focused on the batch users creation because I will create a password-protected area where all the users will access to download the document.


Finding URI in Child Theme

Which is best way to find URI in child Theme.               <?php echo get_template_directory_uri(); ?>     <?php bloginfo('template_directory'); ?>      Below given code works but it has "stylesheet" in it, sounds like its a hake to find URI. Is this the only solution ?               <?php echo get_stylesheet_directory_uri(); ?>     <?php bloginfo('stylesheet_directory'); ?>


wp_nav_menu() loses 'current-menu-*' classes on single product page within category

I have my menu set up like so:   * **Shop Online** (WPeC 'Products Page' page)      * **Product Category** (WPeC Category)     * **Product Category** (WPeC Category)        * **Product Sub Category** (WPeC Category)       * **Product Sub Category** (WPeC Category)     * ... Single product pages are viewable from any category or sub category page as they both show the product listing view. Now when I select either _Shop Online_ , a product category or sub-category the menu updates it's CSS classes to match the current hierachy with the usual (example) `current-menu-page`, `current-menu-ancestor` and `current-menu- parent` among others. It doesn't matter if I click on the menu or the category listing on the _Shop Online_ page to get there. For some reason as soon as I view a product singularly (`domain.tld/product- cat/sub-cat/product-single` or `domain.tld/product-cat/product-single`), the menu classes are removed and I lose my menu highlighting because the classes are no longer there. Is there a way that I can reflect the single product view in the menu by highlighting the current category/ies that the product is in, as well as the `Shop Online` menu item/link respective of how you got to the product? WP v3.5 WPeC v3.8.9.4


Why don't some template tags work when querying information on single.php?

I'm trying to fetch content about the current post into the header.php of my theme (to dynamically insert Facebook OpenGraph Metadata). Since I'm on a single post page, shouldn't it be able to run functions like `the_content()` or `wp_get_attachment_thumb_url()`?               <?php if (is_single()) {                <meta property="og:title" content="<?php echo get_the_title()." - Advocate Daily" ?>" />               <meta property="og:description" content="<?php string_limit_words(the_content(), 15);" ?> />               <meta property="og:image" content="<?php echo wp_get_attachment_thumb_url(); ?>" />     <?php } ?>      In the above example, the first tag works, but the content of the other two isn't outputted. Does this mean certain template tags needs to be in the               if ( have_posts() ) : while ( have_posts() ) : the_post();      loop? Do I need to declare this loop again in the header?


What's the easiest way to setup SMTP settings programmatically?

Assume we have blank WP site and we want to setup SMTP settings programmatically in our plugin or theme. What's the easiest way to do it without changing core files?


Click link on plugin/theme page and open the contextual help on a specific tab

I've added a help section using the add_help_tab() function. I'd like to be able to click a link somewhere on the theme/plugin page and have the help panel open at whichever tab I need. Can someone help me out with the required JS for this? Each tab panel has a unique hash link associated with it so I'd need to use this somehow I'm guessing               /themes.php?page=theme_options#tab-panel-general


Integrating Meet-up feeds into the regular portion of a Wordpress blog

Good day, This is the first question I've ever posted on StackExchange. I've set up a WordPress site for our local makers group, www.redmountainmakers.org. My problem is that I've been asked to incorporate the feed from our meet-up group (Red Mountain Makers on Meet-up, Birmingham AL) into the main blog feed so that as much as possible, we are posting in one location and sending content out to our Facebook page, the blog, etc. The goal is to post once, propagate many times. Using Meet-up's OAuth API, I can pull feed in, but I can't pull feed in _and_ add new content at the blog itself without seriously breaking things. I've looked at HootSuite as a publish and schedule once -> send to many destination solution, but from what I've been able to read thus far, it doesn't appear to support Meet-up. Has anyone else run into this problem, worked out a solution or have any pointers regarding a social media management solution that can push posts to Meet-up, WordPress, Facebook and has an API I can use to code up addtional custom solutions? Will be working on this again as soon as my exams are over May 11th. *Have lurked around the edges for a good two years, but have been able to find what I've needed from other peoples earlier questions and answers.