Warning: include_once(/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php on line 22

Warning: include_once(): Failed opening '/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php on line 22

Warning: include(/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 136

Warning: include(): Failed opening '/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 136

Warning: include_once(/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 173

Warning: include_once(): Failed opening '/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/feed-rss2.php on line 8
cjbarnaby http://cjbarnaby.com/ life attachments = temporal meaning Tue, 07 Mar 2023 01:38:59 +0000 en-US hourly 1 Bulk Move Woocommerce Categories Under Specific Parent http://cjbarnaby.com/bulk-move-woocommerce-categories-under-specific-parent/ Tue, 07 Mar 2023 01:38:24 +0000 http://cjbarnaby.com/?p=3997 Use at your own risk. If you don’t know where this goes you should not be even attempting to use this.     /// bulk move under a specific category parent by ID's function bulk_set_product_category_parent() { $parent_category_id = 149; // Replace with the ID of the parent category $args = array( 'taxonomy' => 'product_cat', 'hide_empty' […]

The post Bulk Move Woocommerce Categories Under Specific Parent appeared first on cjbarnaby.

]]>
Use at your own risk. If you don’t know where this goes you should not be even attempting to use this.    
				
					

/// bulk move under a specific category parent by ID's

function bulk_set_product_category_parent() {
    $parent_category_id = 149; // Replace with the ID of the parent category
    $args = array(
        'taxonomy' => 'product_cat',
        'hide_empty' => false,
        'include' => range(184, 200), // Range of category IDs to update
    );

    $categories = get_categories($args);

    foreach ($categories as $category) {
        $category_id = $category->term_id;
        wp_update_term($category_id, 'product_cat', array(
            'parent' => $parent_category_id,
        ));
    }
}

add_action('admin_init', 'bulk_set_product_category_parent');

				
			

The post Bulk Move Woocommerce Categories Under Specific Parent appeared first on cjbarnaby.

]]>
Copy Post Categories To Woocommerce Categories http://cjbarnaby.com/copy-post-categories-to-woocommerce-categories/ Tue, 07 Mar 2023 01:36:35 +0000 http://cjbarnaby.com/?p=3991 This was a time saver thanks to AI helper. Use at your own risk.   // category post to product copy specific id's function copy_specific_post_categories_to_product_categories() { $args = array( 'taxonomy' => 'category', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false, 'include' => array(76,77,78,79,80,81,82,83,87,88,89,90,91,91,92,93,94,95) // Add the category IDs you want to copy here ); […]

The post Copy Post Categories To Woocommerce Categories appeared first on cjbarnaby.

]]>
This was a time saver thanks to AI helper. Use at your own risk.  
				
					

// category post to product copy specific id's

function copy_specific_post_categories_to_product_categories() {
    $args = array(
        'taxonomy' => 'category',
        'orderby' => 'name',
        'order' => 'ASC',
        'hide_empty' => false,
        'include' => array(76,77,78,79,80,81,82,83,87,88,89,90,91,91,92,93,94,95) // Add the category IDs you want to copy here
    );

    $post_categories = get_categories($args);

    foreach ($post_categories as $post_category) {
        $parent_id = $post_category->parent;
        $cat_args = array(
            'name' => $post_category->name,
            'description' => $post_category->description,
            'slug' => $post_category->slug,
            'parent' => 0,
        );
        $cat_id = wp_insert_term($post_category->name, 'product_cat', $cat_args);

        if (!is_wp_error($cat_id)) {
            if ($parent_id > 0) {
                $parent_term = get_term_by('id', $parent_id, 'product_cat');
                if ($parent_term) {
                    wp_update_term($cat_id['term_id'], 'product_cat', array('parent' => $parent_term->term_id));
                }
            }
        }
    }
}

add_action( 'init', 'copy_specific_post_categories_to_product_categories' );
//


				
			

The post Copy Post Categories To Woocommerce Categories appeared first on cjbarnaby.

]]>
Woocommerce Products Listing Page Exclude Category Filter http://cjbarnaby.com/woocommerce-products-listing-page-exclude-category-filter/ Mon, 06 Mar 2023 22:56:30 +0000 http://cjbarnaby.com/?p=3975 I work in WordPress and Woocommerce often and this code was generated by asking the right questions for ChatGPT which is a very helpful AI. It resides in your functions.php for your activated theme to apply to your product listings page in Woocommerce. I needed something that would help me to pick out certain product […]

The post Woocommerce Products Listing Page Exclude Category Filter appeared first on cjbarnaby.

]]>

I work in WordPress and Woocommerce often and this code was generated by asking the right questions for ChatGPT which is a very helpful AI.

It resides in your functions.php for your activated theme to apply to your product listings page in Woocommerce.

I needed something that would help me to pick out certain product items with a bit more granularity and this helped immensely.

Add it to your site at your own risk. I’m recording it here for my own use specifically however if you get use from it then that’s all good by me.

 

				
					// woocommerce exclude category filter on all products listing page

// Add filter option to exclude products from category
add_action( 'restrict_manage_posts', 'add_exclude_category_filter' );
function add_exclude_category_filter() {
    $current_cat = isset( $_GET['product_cat'] ) ? $_GET['product_cat'] : '';
    $exclude_cat = isset( $_GET['exclude_category'] ) ? $_GET['exclude_category'] : '';
    ?>
    <select name="exclude_category">
        <option value=""><?php _e( 'Exclude category', 'woocommerce' ); ?></option>
        <?php
        $categories = get_terms( 'product_cat', array(
            'hide_empty' => true,
        ) );
        foreach ( $categories as $category ) :
            $selected = $category->term_id == $exclude_cat ? 'selected="selected"' : '';
            $current = $category->term_id == $current_cat ? 'current-cat' : '';
            ?>
            <option class="<?php echo esc_attr( $current ); ?>" value="<?php echo esc_attr( $category->term_id ); ?>" <?php echo $selected; ?>>
                <?php echo esc_html( $category->name ); ?>
            </option>
        <?php endforeach; ?>
    </select>
    <?php
}

function custom_product_query( $query ) {

    // Check if we're on the products listing page
    if ( $query->is_admin && $query->query['post_type'] === 'product' && ! is_null( $query->query_vars['s'] ) ) {

        // Check if the exclude category filter is set
        if ( isset( $_GET['exclude_category'] ) && ! empty( $_GET['exclude_category'] ) ) {
            $exclude_category = absint( $_GET['exclude_category'] );
            $tax_query = array(
                array(
                    'taxonomy' => 'product_cat',
                    'field'    => 'term_id',
                    'terms'    => $exclude_category,
                    'operator' => 'NOT IN',
                ),
            );
            $query->set( 'tax_query', $tax_query );
        }
    }
}
add_action( 'pre_get_posts', 'custom_product_query' );

				
			

The post Woocommerce Products Listing Page Exclude Category Filter appeared first on cjbarnaby.

]]>
WHAT IS MERCURY RETROGRADE (MRX)? HOW DOES IT WORK? HOW TO MITIGATE EFFECTS. http://cjbarnaby.com/what-is-mercury-retrograde-mrx-how-does-it-work-how-to-mitigate-effects/ Wed, 19 Jun 2019 01:07:15 +0000 http://cjbarnaby.com/?p=3058 Firstly, this article assumes that you believe in the affects of planets and their historically experienced attributes. Secondly, I am not a super genius astrologer. This is just all opinion from experience. I hope it helps others to read this. That is part of the intention of this article. Enjoy! What is Mercury Retrograde? Mercury […]

The post WHAT IS MERCURY RETROGRADE (MRX)? HOW DOES IT WORK? HOW TO MITIGATE EFFECTS. appeared first on cjbarnaby.

]]>
Firstly, this article assumes that you believe in the affects of planets and their historically experienced attributes.
Secondly, I am not a super genius astrologer. This is just all opinion from experience. I hope it helps others to read this. That is part of the intention of this article.
Enjoy!

What is Mercury Retrograde?

Mercury retrograde is when the planet mercury literally appears to go backwards if you were to watch it in the sky.
Astrologically there is a slow down period, a point at which it stops, it then gains speed backwards for a time on average a three and a half week period at which point it slows in it’s reverse and then stops before moving slowly back into it’s regular orientation.
This is known in astrology as the pre-shadow which is the time when Mercury begins to slow, the full retrograde and then the post shadow which happens as it get’s back up to speed again.
To get an idea what happens during mercury retrograde it’s best to look at the details behind Mercury the god and his attributes.
(from Wikipedia) Mercury is known as … Governing financial gain, commerce, eloquence, messages, communication (including divination), travelers, boundaries, luck, trickery and thieves and also serves at the guide of souls to the underworld.
Considering this imagine the potentials if these energies where reversed!

How Does Mercury Retrograde Work?

From my life experience of extensive observation of MRx I have seen the following in my life and the lives of those about me.
Firstly I will furnish you with an illustration as this might help in understanding how things play out.
|——MRx preshadow -—-|—-MRx Full effect—-–|—-Mrx post shadow——–|
|—a little ramping up to–|-full on intensity here-|-which then ramps down-|
In my observations the following happens to anything that is Mercury related in your life modified by Mercury Retrograde.
In the examples below I will call mercury related things we do; X.
Any X that involves movement, finance, communication, agreements or plans that occur inside a Mercury Retrograde event period will be skewed in relation to the position inside the event. Similarly… any X that also includes movement, finance, communication, agreements or plans for events outside of an MRx event ALSO have echoes from that event.
If X happens in the pre-shadow it might be ok with small niggles. Like you go on a holiday and forget your camera. You send an email and it gets lost but it’s not an important one and you can sort it out later easily. You ask someone to come over and they get the time wrong and you are put out by an hour but it’s ok. Things like that.
You might note that the closer you are to MRx Full Effect the more FULL the effect! Simple.
So then note that if X happens in the FULL effect part of MRx then expect that, the car you buy as a bargain turns out to be a horrible lemon, the house you were sold is full of termites, your work agreement is misleading and you are being paid less than you ought to and no one told you, your holiday is delayed because your plane has a severe issue and you get put up in a hotel that has bed bugs. To top it all off you attempt to talk your partner through an issue and only make things worse because of misunderstandings. IE. It’s a lot of a shit storm and often.
Again if X happens in the post shadow you might get small niggles depending on how far you are away from the main event.
Here is an example of a post shadow event that played out:
I recently sold an amplifier to a guy in a distant suburb during MRx post shadow. It was packed perfectly. Photographed upon packing, he agreed to photo it on receiving it just in case. I know what happens so I was trying to ensure that nothing could get mixed up.
Firstly the courier never turned up to pick it up. He claimed that he did. I know he didn’t as I have CCTV monitoring at my office. I had to take it to the depot myself.
It arrived a day late. The box was a bit mashed. Upon opening the amp was crushed as it was apparent that there had been great weight put on top of it. It was DOA.
I called the company and got their insurance claim form and called their insurer to make sure it was all being done right. No one mentioned that I had to make the claim within 7 days. I supplied the buyer with all the information to make the claim. He went through the whole process and then at the end of it when submitting was told it had to be done by the sender not the reciever!
I called the insurance company and they apologized and saying they’d process my claim as there is evidence of attempts to make contact already. In the end it worked out. I lost a couple of days work running around to make it happen for the buyer and in the end the claim went through.
The whole event was a Mercury event including agreements, finance, travel, communications. The lot. It all wyrd but was worked out thankfully.
So in summary… any X is modified by MRx if it happens anywhere inside MRx AND any X created in MRx will echo effects of MRx into that event also happening at a later time.

How To Mitigate The MRx Effects

Obviously it’s impossible to stop life just because mercury retrograde is happening however it’s smart to recognise it’s effects and plan around it best you can.
I personally do daily rituals to planets on their day and talk to their Angels as if friends asking for their help in things that relate to what that planet does. It works for me and my partner calls me certifiable even though she talks to plants and I see that as normal.
Every morning in the first planetary hour I burn incense and light a candle to that planet on my altar. I always wear clothing or an item that is planetary day specific and I let those planets and Angels know that I do this as an honorific. To me the planets are a personal experience. In my experience some like it and talk direct to me and others just shine a happy benevolence of energy at/to me.
I speak aloud daily Angelic prayers, planetary prayers and light frankincense and occasionally planetary incense. It feels right to do this and I have mitigated a lot of foul fortune by doing so. I do this mainly during the week and weekends sometimes for Saturdays and Sundays as I like to give myself some time off from ritual for life balance reasons.
Thanks for reading… I hope you gain benefit from this information.
Cjx

The post WHAT IS MERCURY RETROGRADE (MRX)? HOW DOES IT WORK? HOW TO MITIGATE EFFECTS. appeared first on cjbarnaby.

]]>
Just Created My First VR Space : ) http://cjbarnaby.com/just-created-my-first-vr-space/ Wed, 12 Nov 2014 04:58:07 +0000 http://cjbarnaby.com/?p=2889 Took me a few hours to get it down but I finally got one working on my cardboard phone based device. Feeling a little proud of myself. I will upload it later for others to look at. It’s not much to see but the concept is what I was after and I feel that I […]

The post Just Created My First VR Space : ) appeared first on cjbarnaby.

]]>
Took me a few hours to get it down but I finally got one working on my cardboard phone based device.

Feeling a little proud of myself.

I will upload it later for others to look at.

It’s not much to see but the concept is what I was after and I feel that I have achieved what I set out to do which was to create a space.

Put a sculpture in it and then have it work.

Very happy : ) 

C

The post Just Created My First VR Space : ) appeared first on cjbarnaby.

]]>
Make OptimizePress Buttons NOFOLLOW easily http://cjbarnaby.com/make-optimizepress-buttons-nofollow-easily/ Wed, 23 Jul 2014 07:20:42 +0000 http://cjbarnaby.com/?p=2833 This works for version 2.0 … no guarantees for future or previous versions : )   Upon generation of a button or whatever optimize press item with a link you want to set as NOFOLLOW… do this   for the url… enter   http://theurl.com“ rel=”nofollow    what you are doing is adding the closing quote ” a […]

The post Make OptimizePress Buttons NOFOLLOW easily appeared first on cjbarnaby.

]]>
This works for version 2.0 … no guarantees for future or previous versions : )
 

Upon generation of a button or whatever optimize press item with a link you want to set as NOFOLLOW… do this

 
for the url… enter
 
http://theurl.com rel=”nofollow 
 
what you are doing is adding the closing quote ” a space and rel=”nofollow” to force OP to generate what you want IN the shortcode
 
and optimize press will generate it as
 
href=”http://theurl.com%22%20rel=%22nofollow” in the shortcode
 
to adjust EXISTING shortcodes already generated in posts/apges add this to the end before the ” (endquote) of your existing url and then check it in your source generated
 
%22%20rel=%22nofollow

This keeps your linkjuice flowing in the right directions for silo’d sites

The post Make OptimizePress Buttons NOFOLLOW easily appeared first on cjbarnaby.

]]>
Updating Soon! http://cjbarnaby.com/updating-soon/ Wed, 09 Jul 2014 07:36:01 +0000 http://cjbarnaby.com/?p=2829 Apologies for all viewers looking for more portfolio samples. I realized that mammoth task of going through all my prior works and writing it all up and creating posts is daunting. I have been more focused on content delivery for clients rather than updating this section. Please check back soon and I promise to fill this […]

The post Updating Soon! appeared first on cjbarnaby.

]]>
Apologies for all viewers looking for more portfolio samples.

I realized that mammoth task of going through all my prior works and writing it all up and creating posts is daunting.

I have been more focused on content delivery for clients rather than updating this section.

Please check back soon and I promise to fill this in more for you!

The post Updating Soon! appeared first on cjbarnaby.

]]>
Troubleshooting Slow Newtorking Startups on Windows 7 http://cjbarnaby.com/troubleshooting-slow-newtorking-startups-on-windows-7/ Sun, 06 Jul 2014 00:44:55 +0000 http://cjbarnaby.com/?p=2827   So I had this issue where w7 would start up and then it would take a stupid amount of time for the service to recognise that it was connected to the net.   Running cmd and pinging proved I was connected by my wamp installation and the networking symbol with a circle was showing […]

The post Troubleshooting Slow Newtorking Startups on Windows 7 appeared first on cjbarnaby.

]]>
 

So I had this issue where w7 would start up and then it would take a stupid amount of time for the service to recognise that it was connected to the net.

 
Running cmd and pinging proved I was connected by my wamp installation and the networking symbol with a circle was showing that it was still thinking.
 
I googled around and discovered it could be something else causing the issue.
 
I rebooted into safe mode to prove that this was the case and networking came up instantly.
 
I then systematically turned off services with experimentation to figure out what it was.
 
I ran msconfig and then chose to hide all microsoft services. This gave me a list of installed extras that might be the ‘problem’
 
I logically went through the list turning off what I thought it would be and rebooting to test until I got a hit.
 
I found that it started happening after installing my mirroring and backup tool although I wasn’t sure at the time.
 
I turned off the instant start of that service at boot and then reboot to check that was indeed the case.
 
Vindicated I decided to see what could be done so I started services.msc and had a look at the service there.
 
I redefined it to Delayed Start and voila! we are good to go again.
 
A reboot proved my testing and it’s been nice ever since.
 
Try this yourself at your own risk unless you know what you are doing.

 

The post Troubleshooting Slow Newtorking Startups on Windows 7 appeared first on cjbarnaby.

]]>
Nucking Futs Promo Advert http://cjbarnaby.com/nucking-futs-promo-advert/ Wed, 25 Sep 2013 06:23:20 +0000 http://cjbarnaby.com/?p=2721 Mat the owner of BGW wanted something punchy to get the attention of the potential customer base upon launch and I came up with this concept that was run in all major magazines.

The post Nucking Futs Promo Advert appeared first on cjbarnaby.

]]>
Mat the owner of BGW wanted something punchy to get the attention of the potential customer base upon launch and I came up with this concept that was run in all major magazines.

advert 3 nucking futs

The post Nucking Futs Promo Advert appeared first on cjbarnaby.

]]>
MSR Advert For BGW http://cjbarnaby.com/msr-advert-for-bgw/ Wed, 25 Sep 2013 06:17:28 +0000 http://cjbarnaby.com/?p=2717 As part of my contract I was asked to create advertising copy for BGW… here is an example of an MSR advert I created for them.

The post MSR Advert For BGW appeared first on cjbarnaby.

]]>
As part of my contract I was asked to create advertising copy for BGW… here is an example of an MSR advert I created for them.

advert 2 msr

The post MSR Advert For BGW appeared first on cjbarnaby.

]]>