I can manage to show one checkbox using woocommerce products custom fields However, I need to show multiple values from multiple checkboxes in my admin area. I have the following code: <input type=”checkbox” name=”myoption[option_one]” value=”1″<?php checked( isset( $options[‘option_one’] ) ); ?> /> <input type=”checkbox” name=”myoption[option_two]” value=”1″<?php checked( isset( $options[‘option_two’] ) ); ?> /> Now how […]
I have created a review site where clients can rate their hosting providers based on various factors, however since the launch, many have asked if it would be possible to create a price comparison table so they could look for provider’s in their price range. I believe the best way to do this will be […]
I am using the Custom Fields Plugin and have 2 custom fields assigned to my “products” custom post type. Field 1. Price Field 2 Discount Price So this is my code: <div class=”wrapper”> <p>Price: <?php the_field(‘price’); ?></p> </div> “Now this is what I am trying to achieve hypothetically” <div class=”wrapper”> <?php if (the_field(‘discount’); )is set: […]
I was wondering if there is a filter that allows me to enable short codes to work inside the custom meta fields in my posts. I know the following code enables it in widgets: add_filter(‘widget_text’, ‘do_shortcode’); And where would I have to put a code? My theme has shortcodes.php also meta-boxes.php Thanks in advance.
I use this code to show custom field value outside loop on post page (single.php): <?php echo get_custom_field(‘my_custom_field’); ?> But, that is not working on attachment page (image.php). How to show post custom field on attachment page (image.php template)?
I am trying to loop custom post-types, filtered by a custom field artist-status => invited and ordered by another custom field last-name alphabetically. Here is what I managed to write, and it doesn’t work as I need: $args = array( ‘post_type’ => ‘artist’, ‘posts_per_page’ => -1, ‘meta_key’ => ‘artist-status’, ‘meta_value’ => ‘invited’ ‘orderby’ => ‘meta_value_num’, […]
I need to get posts pertaining to a given category, AND : have the event_start_date (custom field) greater or equal than today’s date OR have a event_end date (custom field) greater or equal than today (if their event_start_date date is less than today’s date The results need to be order using the custom_start field. I’m […]
I’m new to wordpress and I am trying to understand these custom fields. I read the wordpress codex page refering to custom fields but I have some questions. I take for example my site. I created a custom field named “country_flag”. I want this custom field to store for every post a link to a […]
I’m creating a Theme Option page for my own wordpress theme and I’ve been trying to create something like this on my option page It means my user(admin) can add any number of input fields (in this image, they’re drop down elements) I need to add this feature as a inbuilt option page, so plugins […]