How to display a product features dynamically with icons?
You can use the popular ACF plugin to dynamically add fields and field groups to the product page. Start with frequently asked questions.
You can use the popular ACF plugin to dynamically add fields and field groups to the product page. Start with frequently asked questions.
I mark this as answered. Go to any page or post and click on edit and follow the arrows below. By default, the custom fields option is hidden on the post edit screen. To view it, you need to click on the three-dot menu at the top-right corner of the screen and select ‘Options’ from … Read more
This is the PHP serialization format, and is used to serialize arrays for storage in the database. Core WordPress functions take care of this process for you. You just need to use an array as the value. For example, this: $schema_article = array( ‘headline’ => ‘aaa’, ); update_post_meta( $remote_id, ‘_schema_article’, $schema_article ); Will save this … Read more
To modify the theme’s registration would be possible, but definitely not recommended. It is likely that you would only be able to add your additional fields by directly modifying the theme files, especially with something like user registration. It would be a pain to maintain if you intend to keep your theme up to date. … Read more
New answer I now have a better understanding of the question thanks to OPs comment and have come up with the following. Not tested! global $wpdb; /** * @var string $field The flexible content field name. */ $field = ‘a_flexible_content_field’; /** * @var string $layout The flexible layout name. */ $layout=”layoutTwo”; /** * @var string … Read more
Following @TomJNowell advices I descarted the usage of SQL query and aimed at the meta_value sorting. I’ll describe the scenario from the beggining with the solution. I have a custom taxonomy called “aplication” and another called “segment”, and every application term has a custom field (ACF) for a segment term. What I needed was to … Read more
To start, why do you want to have your tag data in tags and also in a custom field? Seems to me like there is no reason for this, but maybe I’m missing something. To answer your question about the code you have.. inside your foreach you overwrite the value each time in the loop. … Read more
Hi @idontknowhow: You’ve focused on trying to solve the problem in PHP when in fact you needed to focus on the SQL. Your first problem was you reversed the “polarity” (which is a term I made up just now, but it kinda fits); you were looking for both a start date that was greater than … Read more
paste this code in you theme’s function.php file //get all categorie ID’s in to array $args = array( ‘child_of’ => 3678); // Parent category ID $categories = get_categories( $args ); $cat_array = array(); foreach ($categories as $category) { $cat_array[] = $category->term_id; } $Query_args = array( ‘category__in’ => $cat_array, ‘post_type’ => ‘YOUR_POST_TYPE_NAME’ ); $new_query = new … Read more
If you are using WP 3.1, I would recommend using the meta_query parameter with the WP_Query class. $args = array( “meta_query’ => array( array( ‘key’ => $customkey1, ‘value’ => $customvalue1, ‘compare’ => ‘=’ ), array( ‘key’ => $customkey2, ‘value’ => $customvalue2, ‘compare’ => ‘=’ ) ) ); $query = new WP_Query( $args ); if ( … Read more