Title: John's Replies - page 2 | WordPress.org

---

# John

  [  ](https://wordpress.org/support/users/jsing/)

 *   [Profile](https://wordpress.org/support/users/jsing/)
 *   [Topics Started](https://wordpress.org/support/users/jsing/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jsing/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jsing/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jsing/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jsing/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jsing/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)

[←](https://wordpress.org/support/users/jsing/replies/?output_format=md) [1](https://wordpress.org/support/users/jsing/replies/?output_format=md)
2

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] [Plugin: Posts 2 Posts] Default value for 'fields'](https://wordpress.org/support/topic/plugin-posts-2-posts-default-value-for-fields/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-default-value-for-fields/#post-2699218)
 * How can this data be displayed? Here is what i have:
 *     ```
       /* Register connection */
       function svrn_connection_type() {
           $connection_args = array(
   
       'name' => 'posts_to_customers',
               'from' => 'post',
               'to'   => 'customer',
   
                   'fields' => array(
                       'type' => array(
                           'title' => __('Type', 'svrn'),
                           'values' => array(
                               'purchase' => __('POS', 'svrn'),
                               'pawn' => __('Pawn', 'svrn'),
       			'vendor' => __('Vendor', 'svrn'),
       			'sale' => __('Sale', 'svrn')
                           	),
                       )
                   )
   
           );
   
           p2p_register_connection_type($connection_args);
       }
   
       add_action( 'init', 'svrn_connection_type' );
       ```
   
 * Which works great. For getting the name of the customer I have been using:
 *     ```
       <?php
       // Find connected customers
       $connected = new WP_Query( array(
         'connected_type' => 'posts_to_customers',
         'connected_items' => get_queried_object(),
         'nopaging' => true,
       ) );
   
       // Display connected customers
       if ( $connected->have_posts() ) :
       ?>
       <ol>
       <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
       	<li><a href="<?php the_permalink(); ?>"><?php the_title();  ?></a>
       </li><br/>
       <?php echo p2p_get_meta($post->p2p_id, 'type', true );?>
       ```
   
 * I only get the title of the post but not the Type.
 * Thanks.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Adding values from custom fields from a single category](https://wordpress.org/support/topic/adding-values-from-custom-fields-from-a-single-category/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/adding-values-from-custom-fields-from-a-single-category/#post-2943544)
 * Thanks! It worked like a charm!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [List post ids for all results of search](https://wordpress.org/support/topic/list-post-ids-for-all-results-of-search/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/list-post-ids-for-all-results-of-search/#post-2736895)
 * I am not sure I follow exactly. I am using Taxonomy Picker to let the user build
   the query. What I don’t know is how to use that custom query and use it to return
   the custom field values.
 * So the taxonomies would vary with each search so I don’t think I can hard code
   them in. That is why I thought the ID’s of the posts on the page would be good.
 * As stated I have little php or sql knowledge so I don’t know how to list the 
   ID’s from the results much less use them as a variable in a query.
 * I also don’t know how to go about joining the taxonomy table etc.
 * Any help would be great! Thanks for your time.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Unable to edit any of my pages or posts](https://wordpress.org/support/topic/unable-to-edit-any-of-my-pages-or-posts/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/unable-to-edit-any-of-my-pages-or-posts/#post-2478086)
 * This may seem like an odd question but have you tried to “highlight” content 
   in the editor box in visual mode by clicking inside and dragging? I bet it will
   show the content that you can’t see, as though the text color is set to white.
 * I was messing with a plugin that allowed drag and drop uploading to the editor
   and it had that affect. So if the content is still there in visual, just white
   like the background of the editor I would do the good ‘ol plugin review (disabling
   one by one) and a theme test.
 * Then consider looking for things that would affect the admin css, maybe re-install
   WordPress to make sure you have a good copy of the core files.
 * What version of WP are you using?
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Counting users of a role in all network sites](https://wordpress.org/support/topic/counting-users-of-a-role-in-all-network-sites/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/counting-users-of-a-role-in-all-network-sites/#post-2477007)
 * Ok so it looks like I win the turkey…you can all stop scouring for the answer,
   I got it working like I wanted.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Links dont work on subdirectories but work fine on main site](https://wordpress.org/support/topic/links-dont-work-on-subdirectories-but-work-fine-on-main-site/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/links-dont-work-on-subdirectories-but-work-fine-on-main-site/#post-2478063)
 * Could you post the contents of your .htaccess and give a little info as to host,
   OS, etc.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Can't log in to dashboard, and my site has no style…](https://wordpress.org/support/topic/cant-log-in-to-dashboard-and-my-site-has-no-style/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/cant-log-in-to-dashboard-and-my-site-has-no-style/#post-2477565)
 * There is a good chance it is your httpd.conf file not allowing the .htaccess 
   file to be read. Open the site configuration file and look for Allow Overrides
   All, you may see Allow Overrides None, if so change it to All and save it. Then
   refresh.
 * If that isn’t it. Some other info may help as well, like host, OS, WP or WP Mulitsite?
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Admin Bar Modification](https://wordpress.org/support/topic/admin-bar-modification/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/admin-bar-modification/#post-2472530)
 * Keep in mind I have no idea what I am doing… this returns the url that you want:
 *     ```
       $current_user = wp_get_current_user();
       $current_name = $current_user->user_login;
       $url = site_url('/author/');
   
       echo $url . $current_name;
       ```
   
 * So after adding all but the last line of that to define the two partsabove the‘
   href’ I think you could then say:
 *     ```
       'href' => $url . $current_name;
       ```
   
 * or one more step (probably unnecessary)
 *     ```
       $current_user = wp_get_current_user();
       $current_name = $current_user->user_login;
       $url = site_url('/author/');
       $new_url = $url . $current_name;
   
       'href' =>$new_url;
       ```
   
 * I am sure someone else probably knows a better way but at least this should get
   you going in the right direction.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Give exisiting wordpress role admin rights](https://wordpress.org/support/topic/give-exisiting-wordpress-role-admin-rights/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/give-exisiting-wordpress-role-admin-rights/#post-2473765)
 * This does what you want and more…
 * [http://wordpress.org/extend/plugins/members/](http://wordpress.org/extend/plugins/members/)
 * The role manager is very useful.

Viewing 9 replies - 16 through 24 (of 24 total)

[←](https://wordpress.org/support/users/jsing/replies/?output_format=md) [1](https://wordpress.org/support/users/jsing/replies/?output_format=md)
2