hashimnaushahi
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Show value of custom field of custom taxonomy@karpstrucking, your code works!
I was getting an error because I forgot to add certificates in the product I’m testing. After I added certificates it worked perfectly!
Sorry I bothered you with this. And thank you so much for your help! ??
- This reply was modified 3 years, 2 months ago by hashimnaushahi. Reason: Marked ticket as resolved
Forum: Developing with WordPress
In reply to: Show value of custom field of custom taxonomyHi @karpstrucking,
Was the additional information useful in any way or are you just as stuck as I am? ??
Forum: Developing with WordPress
In reply to: Show value of custom field of custom taxonomyThank you so much for sticking with me!
The taxonomy slug of that custom taxonomy in CPT UI is ‘certificates’.
Additionally, the field of name of the custom field of the field type ‘image’ in ACF which I added to that custom taxonomy is ‘certificate’.
Does that help somewhat?
Forum: Developing with WordPress
In reply to: Image selection from custom fieldThis ticket no longer needs to be replied to. I found another solution which eliminates the need for a custom upload folder.
Thank you for thinking along!
Forum: Developing with WordPress
In reply to: Show value of custom field of custom taxonomyHi @karpstrucking,
Unfortunately, I can’t get the code to work. And I hope you’re willing to help me out just a bit further.
And by the questions I’m asking you’ll definitely be able to tell how much of a rookie I actually am. So, my apologies in advance. ??
I mixed your code with the code provided by ACF to display the image and then turned it into a shortcode. And this is the result:
<pre><code>function na_display_certificates() { global $post; $terms = get_the_terms( $post, 'certificates' ); foreach ( $terms as $term ) { $image = get_field( 'certificate', $term->taxonomy . '_' . $term->term_id ); $size = 'medium'; // (thumbnail, medium, large, full or custom size) if( $image ) { echo wp_get_attachment_image( $image, $size ); } } } add_shortcode( 'certificates', 'na_display_certificates' );
Also, the theme I’m using is Kadence. And they offer Kadence Elements. So I created an element with the shortcode [certificates] and with the help of hooks set it to display in the short description of the single product page.
However, the images aren’t showing.
I know the element works because I also filled that element with just text as a test. And that text is showing up.
So I know my code isn’t right.
Do you think you can help out this rookie developer with this?
Thank you in advance!
Sincerely,
Hashim
- This reply was modified 3 years, 2 months ago by hashimnaushahi. Reason: typo
- This reply was modified 3 years, 2 months ago by hashimnaushahi.
Forum: Developing with WordPress
In reply to: Show value of custom field of custom taxonomyHi @karpstrucking,
Thank you so much for your reply!
You’ve helped me so much. I’ll give this a try right away and keep you updated.
??
Forum: Developing with WordPress
In reply to: Image selection from custom fieldHi @corrinarusso,
Thank you for your repy!
This is just for ease of use. The goal is to make it easy for the users to select the images that belong to the certificates without going through the entire media library. That’s why I created a separate folder containing only images that belong to the certificates.
I hope that helps. Do you have an idea about how to achieve that?
Forum: Fixing WordPress
In reply to: Turn PHP into a shortcodeI know it’s a bit late. But thank you for your support, @bcworkz!
Forum: Fixing WordPress
In reply to: Turn PHP into a shortcodeHi @johnny5,
Thanks for your reply!
That is a really helpful resource. It’ll defnitely help me.
So for this particular function that has ‘display’ in the name…
Do you know how I can turn that into a shortcode?
The goal is to output the product attributes on the single product page wherever I write that shortcode.
The Kadence theme offers Elements and Hooks. Through it I’m able to create an element that will show on a specific location of all single product pages. So I’d like to use the shortcode inside that element so that the product attributes will show on the desired location.
I’m looking forward to your further suggestions. Thank you in advance!
Sincerely,
Hashim
Forum: Plugins
In reply to: [WooCommerce] Code to output attributesHi gabrielfuentes,
Thank you for your reply!
I understand that the entire case is fairly complex. And I appreciate your suggestions. Hopefully they’ll help me get further with this.
Could you help me with just one aspect of this question?
Do you know the code that outputs the product attributes?
Right now the product attributes are outputted in the product tabs on the single product page. So there should be a code that does that on that particular location of the single product page. If we know what that code is, we might be able to use that code on a different location of that same page with hooks.
I’m looking forward to your reply. Thank you in advance!
Sincerely,
Hashim
Forum: Plugins
In reply to: [Uncanny Toolkit for LearnDash] Login page not working anymoreHi there,
I was thinking in so many difficult ways that I didn’t think of something simple like that. Thank you so much for helping me out!
Sincerely,
Hashim
- This reply was modified 6 years, 2 months ago by hashimnaushahi. Reason: typo
Forum: Plugins
In reply to: [Uncanny Toolkit for LearnDash] Login page not working anymoreHi there,
Thank you so much for your fast reply!
The PHP version is 7.0.31. I understand that the version of LearnDash is too old. Actually I don’t need LearnDash anymore for now. I probably will be needing it again for my next course, but for now I don’t have any new courses planned.
What has me worried is that I’ve got all my LearnDash plugins and the LearnDash Toolkit deactivated but I’m still seeing that code on my login page. Do you have any idea how I can fix that so that I’ll get the regular login page back?
Thank you so much for your help!
Sincerely,
Hashim
I will. Thank you, Josh!
Forum: Plugins
In reply to: [Comments - wpDiscuz] Text doesn't changeThank you for making that clear! ??
Forum: Plugins
In reply to: [Comments - wpDiscuz] Two suggestionsThank you for letting me know. I’ll be looking forward to your next releases!
Sincerely,
Hashim Naushahi