Title: Overflow's Replies | WordPress.org

---

# Overflow

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 104 total)

1 [2](https://wordpress.org/support/users/acrane/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/acrane/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/acrane/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/acrane/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/acrane/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/acrane/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More] Gulp freezes Duplicator's System Scan?](https://wordpress.org/support/topic/gulp-freezes-duplicators-system-scan/)
 *  [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/gulp-freezes-duplicators-system-scan/#post-6387067)
 * Well dang, I’m having the same issue it seems. Running Gulp with MAMP.
 * Viewing the debugger in FF, looks like the following script gets hung and won’t
   allow the scan to continue and it freezes…
 * wp-includes/js/wp-emoji.min.js
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP FullCalendar] Advanced Custom Fields](https://wordpress.org/support/topic/advanced-custom-fields-11/)
 *  [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/advanced-custom-fields-11/#post-5668424)
 * I’m using a start and end date. But I’m having to add a day to the end date to
   get it to view properly. Any reason for that? My changes for that are below:
 *     ```
       $post_date = substr($post->post_date, 0, 10);
       $post_timestamp = strtotime($post->post_date);
       ```
   
 * to
 *     ```
       $time_date = get_field('event_date');
       $endDate = get_field('end_date');
       $endDate += date_create($endDate);
       date_add($endDate, date_interval_create_from_date_string('+1 day'));
       $post_date = substr($time_date, 0, 10);
       $post_timestamp = strtotime($time_date);
       $end_timestamp = strtotime($endDate);
       ```
   
 * And
 *     ```
       $item = array (
       	"title" => $title,
       	"color" => $color,
       	"start" => date('Y-m-d\TH:i:s', $post_timestamp),
       	"end" => date('Y-m-d\TH:i:s', $post_timestamp),
       	"url" => get_permalink($post->ID),
       	'post_id' => $post->ID
       );
       ```
   
 * to
 *     ```
       $item = array (
       	"title" => $title,
       	"color" => $color,
       	"start" => date('Y-m-d\TH:i:s', $post_timestamp),
       	"end" => date('Y-m-d\TH:i:s', $end_timestamp),
       	"url" => get_permalink($post->ID),
       	'post_id' => $post->ID
       );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weight Based Shipping for WooCommerce] Rounding amendment , cart does't match order…](https://wordpress.org/support/topic/rounding-amendment-cart-doest-match-order/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/rounding-amendment-cart-doest-match-order/#post-6269951)
 * [This option](http://store.anneneilsonfineart.com/shipping-methods.png) does 
   not uncheck when you disable this plugin:
 * I’m also using PayPal Pro from Woo.
 * When I upgraded I had the error. I was able to get around that error one version
   back from the current paypal pro, by changing, get_shipping() to get_formatted_shipping_address()
 * I know that change has nothing to do with your plugin, but I can’t get this plugin
   to work with the latest woo 2.3.11, and latest woo paypal pro. 4.3.4
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Weight Based Shipping for WooCommerce] Rounding amendment , cart does't match order…](https://wordpress.org/support/topic/rounding-amendment-cart-doest-match-order/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/rounding-amendment-cart-doest-match-order/#post-6269932)
 * Yes. The only way I was able to checkout was to disable this weight based plugin.
 * Also something to note: Whenever you disable this plugin, the option under “Woo
   > Settings > shipping, is still checked for this plugin, so you have to deactivate,
   and uncheck that option. Seems like that option would uncheck upon deactivation.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Including "&" in search results](https://wordpress.org/support/topic/including-in-search-results-1/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/including-in-search-results-1/#post-5895876)
 * Well, that last suggestion led my to my answer, thanks.
 * I added
 *     ```
       $new_text = str_replace('&', '& amp;', $searchRequest);  // <- no spaces in the & amp;
       ```
   
 * to right above get_terms after the search request to change any ‘&’ to ‘&’.
 * So, my final get_terms query looks like this:
 *     ```
       // get what we're searching for
       $searchRequest = $_REQUEST['s'];
       $new_text = str_replace('&', '& amp;', $searchRequest); // <- no spaces in the & amp;
   
       $args = array(
           'search' => $new_text,
       	'hide_empty' => 0, // false, show empties
       );
       $taxonomy = 'manufacturer';
       $termsResult = get_terms($taxonomy, $args);
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Including "&" in search results](https://wordpress.org/support/topic/including-in-search-results-1/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/including-in-search-results-1/#post-5895835)
 * You can see the search results for “S&” [here.](http://chapman.bellaworksweb.net/bw/?s=S%26&search-type=manufacturer&post_type=manufacturer&submit=)
   But you’ll notice “S&C” does’t work.
 * Products = A custom post type
    Manufacturers = Custom tax to the Products CPT
 * Yes, added the ampersand code.
 * Search template looks like this:
 *     ```
       // get what we're searching for
       $searchRequest = $_REQUEST['s'];
   
       $args = array(
           'search' => $searchRequest,
       	'hide_empty' => 0, // false, show empties
       );
       $taxonomy = 'manufacturer';
       $termsResult = get_terms($taxonomy, $args);
   
       <?php if ( !empty($termsResult)) : ?>
       	<?php  foreach ( $termsResult as $term ) { ?>
   
       <h2><?php echo $term->name ?></h2>
       <?php }
       else: ?>
       ... and the rest of the not found
       ```
   
 * Searching “S&C” brings back an empty array for some reason.
 * Thanks for you help.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Search Taxonomy terms not posts](https://wordpress.org/support/topic/search-taxonomy-terms-not-posts/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/search-taxonomy-terms-not-posts/#post-5545234)
 * Use get_terms() to retrieve terms that match your search query like :
 * `$termsResult = get_terms( 'CUSTOM_TAXONOMY_NAME', 'search=SEARCH_QUERY' );`
   
   where,
 * CUSTOM_TAXONOMY_NAME is your custom taxonomy and SEARCH_QUERY is the string which
   you are using to search for terms.
 * Afterwards you can generate list like :
 *     ```
       if ( ! empty( $termsResult ) && ! is_wp_error( $termsResult ) ){
         echo '<ul>';
           foreach ( $termsResult as $term ) {
             echo '<li><a href="'.get_term_link( $term ).'">' . $term->name . '</a></li>';
           }
         echo '</ul>';
       }
       ```
   
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [get_adjacent_post with multiple hierarchal categories](https://wordpress.org/support/topic/get_adjacent_post-with-multiple-hierarchal-categories/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/get_adjacent_post-with-multiple-hierarchal-categories/#post-5456612)
 * Thank you so much! That little helped my put together my query that works!
 * I do however have a simple detail left to solve that I can’t quite seem to figure
   out. I have my prev/next links working, except, when it gets to the end and their
   is no next date(it just shows the current). I would prefer to keep looping through
   the results, but If I can just hide the link if there is not another, I could
   roll with that solution.
 * [http://pastebin.com/kD3W8iBd](http://pastebin.com/kD3W8iBd)
 * I just want to thank you [@bcworkz](https://wordpress.org/support/users/bcworkz/),
   you have helped me tremendously in the past and continue to do so, thanks.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Add a Custom Post type in the Dropdown](https://wordpress.org/support/topic/add-a-custom-post-type-in-the-dropdown/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/add-a-custom-post-type-in-the-dropdown/#post-5398199)
 * Thanks for the help. I had actually come across that later, but that was to remove
   nodes, not add them I also found the codex to be a little more informative on
   how to find the id’s of the nodes you want to remove.
 * [http://codex.wordpress.org/Function_Reference/remove_node](http://codex.wordpress.org/Function_Reference/remove_node)
 * Added bonus was doing a foreach loop in that function to remove nodes from any
   site the user was an owner of. Explanation here:
    [http://wordpress.stackexchange.com/questions/165787/how-to-remove-nodes-site-wide-from-the-toolbar-on-multisite-install](http://wordpress.stackexchange.com/questions/165787/how-to-remove-nodes-site-wide-from-the-toolbar-on-multisite-install)
 * Then, using add_node I was able to create my own custom dropdown complete with
   Custom Post Types.
 * Thanks!
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Toolbar show by default?](https://wordpress.org/support/topic/toolbar-show-by-default/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/toolbar-show-by-default/#post-5403670)
 * Awesome. How did I miss that little function!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [infowindow on googlemap for wordpress](https://wordpress.org/support/topic/infowindow-on-googlemap-for-wordpress/)
 *  [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/infowindow-on-googlemap-for-wordpress/#post-5403067)
 * This is actually very easy using Advanced Custom Fields.
 * [http://www.advancedcustomfields.com/resources/google-map/](http://www.advancedcustomfields.com/resources/google-map/)
 * You’ll see some code examples at the bottom with some required css and javascript.
   You’ll see in the last example where he shows how to render multiple markers.
   And in that example he adds extra html within the maker div. That is what pops
   up when you click on the marker, which is automatically done with the provided
   javascript.
 * Since you’re going about rendering your maps in a slightly different way with
   location info you already have, you may just want to see how he is rendering 
   the InfoWindow();
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [How to remove nodes site wide from the toolbar on multisite install](https://wordpress.org/support/topic/how-to-remove-nodes-site-wide-from-the-toolbar-on-multisite-install/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/how-to-remove-nodes-site-wide-from-the-toolbar-on-multisite-install/#post-5401567)
 * Answer:
 *     ```
       add_action( 'admin_bar_menu', 'remove_toolbar_items', PHP_INT_MAX -1 );
       function remove_toolbar_items( $bar )
       {
           $sites = get_blogs_of_user( get_current_user_id() );
           foreach ( $sites as $site )
           {
               $bar->remove_node( "blog-{$site->userblog_id}-c" ); //comments
               $bar->remove_node( "blog-{$site->userblog_id}-d" ); //dashboard
           }
           $bar->remove_node( 'new-media' ); // +New
           $bar->remove_node( 'wp-logo' ); // wp Logo
       }
       ```
   
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Page title and thumbnail outside loop](https://wordpress.org/support/topic/page-title-and-thumbnail-outside-loop/)
 *  [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/page-title-and-thumbnail-outside-loop/#post-5374152)
 * I think you want to use get_the_title() when echoing.
 * [http://codex.wordpress.org/Function_Reference/get_the_title](http://codex.wordpress.org/Function_Reference/get_the_title)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Creating a cookie](https://wordpress.org/support/topic/creating-a-cookie/)
 *  [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/creating-a-cookie/#post-5376573)
 * Not sure what you’re collecting from the database and what kind of query you 
   want to do to acheive that but I set a cookie the other day by putting some simple
   functions in my functions file. Basically when a user first comes to this site,
   a multi language site, it ask which language you want. Then, it sets a cookie
   so you don’t have to be asked again and redirects you to the languages homepage.
 * This function set the cookie:
 *     ```
       function site_set_user_language() {
           if(!isset($_COOKIE['site_language'])){
               setcookie('site_language', 'en', time() + (86400 * 7));
           } elseif (is_page('esp')){
              		setcookie('site_language', 'esp', time() + (86400 * 7));
           } elseif (is_page('fr')){
                   setcookie('site_language', 'fr', time() + (86400 * 7));
           }  elseif (is_page('en')){
                   setcookie('site_language', 'en', time() + (86400 * 7));
           }
        }
       add_action( 'wp', 'site_set_user_language',10,1);
       ```
   
 * Then this function checked the cookie and redirected:
 *     ```
       function site_lang_home_redirect()
       {
           if( is_front_page() ){
   
       		$value = $_COOKIE['site_language'];
   
       		if($value == 'esp') {
               wp_redirect( get_bloginfo('url') . '/esp');
               exit();
       		} elseif($value == 'fr') {
               wp_redirect( get_bloginfo('url') . '/fr');
               exit();
       		} elseif(is_page('en')) {
               wp_redirect( get_bloginfo('url'));
               exit();
       		}
           }
       }
       add_action( 'template_redirect', 'site_lang_home_redirect',9 );
       ```
   
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [is_tree not working as expected](https://wordpress.org/support/topic/is_tree-not-working-as-expected/)
 *  Thread Starter [Overflow](https://wordpress.org/support/users/acrane/)
 * (@acrane)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/is_tree-not-working-as-expected/#post-5304793)
 * Thanks for the ideas bcworkz. I’ve found it does work out of the loop. By reseting
   the postdata, the global postdata of what page you’re on is able to be retrieved
   with get_queried_object(); and the conditional function that I’m using works.
 * I ended up in the end having a silly mistake, I had a if, in the middle of elseif’s
   and it was throwing the function off.
 * Thanks for the response.
 * ps. the original function i pasted here, did not have the problem I had, i had
   simplified it for posting. (bad idea)

Viewing 15 replies - 1 through 15 (of 104 total)

1 [2](https://wordpress.org/support/users/acrane/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/acrane/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/acrane/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/acrane/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/acrane/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/acrane/replies/page/2/?output_format=md)