Joe Dostie
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Trying to center image in image widgetThe <center> tag is not supported in HTML5 and should not be used…
Instead, click on the image in the widget and and then select “Edit Image”
Once there select the Advanced Options
In the section for Image CSS Class just add aligncenter
That should center the image
Forum: Plugins
In reply to: [Warm Cache] Cloudflare ProxyI’m noticing the same thing….
I have my site working with CloudFlare and when I go to run the URL only it causes CloudFlare to crash…and when it does the job will run 1 time.
Once Cloudflare comes back up, the job stops running….
It kind of makes sense because Warm Cache appears to be going OUT to Cloudflare to generate the pages but it should not be doing that, it should be staying local to my service…
I’m thinking there should be a way to tell bluehost to NOT go to cloudflare to visit my site….
Forum: Plugins
In reply to: [WooCommerce] Products attributes filtering taxonomyYes, I briefly looked at that (it was the more difficult of all of them) also Product Filter and MDTF (Meta Data Taxonomy and Filter) and they all work very well with Categories and Taxonomies but not work well with the metadata except for MDTF but it involves a ton of work.
I will take another look at FacetWP and you have me rethinking the custom post types again (my original plan) but I was just very surprised that no one focuses on the Meta Data also.
Some say they do Meta but its the Author and price and things like that which are native to Woo.
If I want to add an attribute, say…”Material” with the option of wood or steel. I can do it easily as a category or taxonomy and most (if not all) filters pick that up. But as meta data, they don’t.
The more I talk about this, the more CPTs seem a better option (because of the catalog approach). It originally seemed simpler to use something already designed.
Forum: Plugins
In reply to: [WooCommerce] Products attributes filtering taxonomySo that is a very fair question, and here is my honest answer…I wanted to learn Woo! ??
Learning Woo was my primary motivator and another additional reasons was because I am using the Avada theme which also integrates with Woo very nicesly. I wouldn’t have to design single and archive pages. The presentation layer is pretty slick (the lightboxes and tabs and all that).
In all actuality its was very simple to get up and running. Which also made Woo an attractive option.
I agree that the features I am not using (shipping, taxes, etc) are a little bloated if I never use them.
I have struggled with this same question after looking at Advanced Custom Fields Pro but honestly at the time I wanted to learn Woo and almost everything satisfied my needs until the filtering.
I have not ruled out custom post types either, just wanted to understand the filtering better.
But thanks for the feedback Mike, you reconfirmed one of my other thoughts and its something I will consider again.
Forum: Plugins
In reply to: [User Role Editor] How can I set a role to the user programmatically?Phew…I got this working thanks to Chad Butler of WP-Members.
What I ended up doing was a combination of his code and the WP_User.
A leraning curve for me was that I thought everything on the user-edit.php could be controlled by the “edit_user_profile_update” hook but after Chad showed me that I needed a hook from his plugin, everything started working fine.
Thanks for the help Vladimir!
Forum: Plugins
In reply to: [User Role Editor] How can I set a role to the user programmatically?PS.. that //if statement is NOT commented out (that was just another test)
Forum: Plugins
In reply to: [User Role Editor] How can I set a role to the user programmatically?Thank you Vladimir,
Sorry, I actually did use set_role I also tried a few other things and that was my last code I pasted.
But I still seem to be having an issue and its really eluding me…
First, I have checked URE and the roles I added. The name is Volunteer User and the ID is volunteer_user
UREI also checked the database in the options table and usermeta table and the Role is s:14:”volunteer_user“;b:1;
When I use this code:
add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); function my_save_extra_profile_fields( $user_id ) { //if ( current_user_can( 'edit_user', $user_id ) ) $user = new WP_User( $user_id ); $user->set_role('volunteer_user'); }
When I click the “Update User” button on the user-edit.php page it basically looks like nothing happens, the user is never added to the “Volunteer User” role as I expect it to.
So just out of curiosity I tried ‘contributor’ and still, nothing happened. At this point I thought the code was not working.
But the weird part is the if I replace the role ID with something that does NOT exist, for example this code:
add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); function my_save_extra_profile_fields( $user_id ) { //if ( current_user_can( 'edit_user', $user_id ) ) $user = new WP_User( $user_id ); $user->set_role('FAKE ROLE'); }
and then I click the “Update User” button, it creates the new capability and assigns the user that capability
URE2
So I know the function is firing.I have triple checked the spelling (all lower case)
I disabled ALL pluginsEverything I am reading says this is being done correctly.
I’m sitting here scratching my head at this point.
Kindest Regards
Forum: Plugins
In reply to: [User Role Editor] How can I set a role to the user programmatically?Thank you so much Vladimir, I think this is very close to what I need but I think I am having trouble with the terminology of “roles” vs. capabilities and how (URE) “User Role Editor” names things.
I created a “Role” through URE and assigned it several capabilities
Image1Using the this code
add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); function my_save_extra_profile_fields( $user_id ) { if ( !current_user_can( 'edit_user', $user_id ) ) return false; $user = new WP_User( $user_id ); $user->add_role('Volunteer User'); }
The user is not “added” to the “existing” role created by URE, instead a new Capability is listed in the custom capabilities.
Image2So what I am trying to do is add the user to a Role (with capabilities).
Image3Thank you again for any insight.
Joe Dostie
C2CNDForum: Plugins
In reply to: [User Role Editor] How can I set a role to the user programmatically?Any word on what this would look like?
I created a custom role with User Role Editor (called volunteer_user)
And my code looks like this:
add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); function my_save_extra_profile_fields( $user_id ) { if ( !current_user_can( 'edit_user', $user_id ) ) return false; $user_id = wp_update_user(array('ID' => $user_id,'role' => 'volunteer_user')); }
And when I click the button “Update User” on the user-edit.php page I don’t see that Role added to the usermeta in the capabilities.
Am I doing something wrong?
Any help would be appreciated!
Forum: Plugins
In reply to: [Petfinder: Search & Rescue] Messing hard with my site's basic formattingForum: Plugins
In reply to: [Petfinder: Search & Rescue] Messing hard with my site's basic formattingHi all…
I ended up finding the issue and fixing it…
It appears to me that there is an “extra” closing </div> tag on line 1354 in the petfinder-search-rescue.php file.
Mind you, this is probably NOT be improper code but MY theme had an issue with it.
I am using Avada 3.7.1
Changing
</div><div class="poweredByPetfinder">Powered by Petfinder.com</div></div><!--end petfinder search & rescue container-->'</div>;
To this:
</div><div class="poweredByPetfinder">Powered by Petfinder.com</div></div><!--end petfinder search & rescue container-->';
This fixed my issue and the side bar now appears correctly.
Hope this helps someone else!
Forum: Plugins
In reply to: [Petfinder: Search & Rescue] Messing hard with my site's basic formattingHello Stephanie,
I am having the same problem. I have gone through the requirements and I am having the same problem.
I am using a theme with a page that has sidebars.
I used firebug to try and find the CSS that is doing this but as of yet no luck.
Please see my page here:
https://69.195.124.253/~ctwocndo/adoptions/Your plugin has been great!
If you need an account and need to get into my site just let me know and I can make you one.
Kind Regards,
Joe DostieHi Rocket1j,
I think what you are looking for is a “POST-BASED SLIDER.” I also had some trouble with this at first.
Check out this video, its how I learned…
https://www.youtube.com/watch?v=SINAKFbS6OgOn my home page on the right you can see Rev Slider using the Events
Catering To Cats and DogsIf you add your own custom fields then you may need to use the “meta:YOURFIELD”
The site isn’t 100% done but if I know what you are looking to do I would be happy to share any code.
Hope this helps!
Forum: Plugins
In reply to: Events manager on LayerSlider WPSame quiestion here