Tag Info

New answers tagged

0

Edit :// try this: <?php add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); function sk_display_custom_fields() { /*Wordpress loop*/ global $wp_query; query_posts(array( 'post_type' => 'sammenligne' )); while(have_posts()) : the_post(); ?> $navn = get_field( 'navn' ); $type = get_field( ...


0

yes it does work on my other site archive-sammenligne.php, which is the archive file for the slug sammenligne. This is the output from Advanced Custom Fields. I've removed the other fields (I have abut 20). if(function_exists("register_field_group")) { register_field_group(array ( 'id' => 'acf_kredittkort', 'title' => ...


1

Thanks Vancoder for your help!!! I have been ripping my hair out all day trying to figure it out. Funny enough your solution was one of half a dozen I wrote on my whiteboard, BUT I had no clue how to actually create an array with that as a key. I am a noob like that. Below is the code I ended up using with some comments for anyone else trying to do this! ...


1

Rather than outputting your terms in that initial loop, I would use it instead to build a new array, with your issue_date as the key: $my_new_array = array( ); foreach ( $terms as $term ) { $issue_date = get_field( 'issue_date', $term ); $my_new_array[$issue_date] = $term->name; } You can then loop through this new array in order: ksort( ...


0

You can try a plugin like export user data. It can export users with the user meta. ACF should be from what I remember storing user custom fields as user meta data so they should be compatible, but this will depend on the export plugin. If this plugin doesn't work you'll need to write a simple script that would loop through the required users with ...


1

You need to use get_field function here instead of the_field. function wrapImagesInDiv($content) { if ( in_category( 'projects' ) ) { $pattern = '/(<img[^>]*class=\"([^>]*?)\"[^>]*>)/i'; $replacement = ' <div class="owl-wrapper"> <div class="owl-item $2"> ...


0

You need to use the type parameter for custom field. Try this once <?php $currentshowid = get_the_ID(); $today = date('Y-m-d'); $args = array( 'meta_key' => 'show_id', 'meta_value' => $currentshowid, 'orderby' => 'meta_value_num', 'order' => ASC, 'meta_query' =>array( ...


1

The very first line contains an incomplete opening PHP tag, it should be <?php not < ?php or some other variation. Also if statements don't require a semi-colon after them. Your code is also not indented correctly. A good editor will auto-indent code for you automatically. A good editor will also syntax check and point out errors as you type them. ...


0

You need to use the hooks attachment fields to edit / save to ad and save the fields. function add_attachment_field_credit( $form_fields, $post ) { $form_fields['paper-type'] = array( 'label' => 'Paper type', 'input' => 'text', 'value' => get_post_meta( $post->ID, 'paper_type', true ), 'helps' => 'Photo ...


0

Use the old method of adding the relationship field -> Post Object <?php while (have_posts()) : the_post(); ?> <div class="entry-content"> <h1 class="content-headline">Package: <?php the_title(); ?></h1> </div> <div class="package-description" style="padding:15px 10px;background:white;"> <?php ...



Top 50 recent answers are included