Support

Account

Forum Replies Created

  • I’ve solved part of the problem with some wpdb queries; now I have to show the subfields wich are in the same row of the relationship field called by the query.
    To be more clear:

        global $wpdb;
    $queries = $wpdb->get_results( "SELECT * FROM wp_postmeta WHERE meta_key LIKE 'key1_%_key2' AND meta_value LIKE '%" . get_the_ID() . "%'");
        
    						?>
    						<?php if( $queries ): ?>
    							<ul>
    							<?php foreach( $queries as $query ): ?>
    								<?php 
    
    								$photo = get_field('_photo', $query->post_id);
    								?>
    								<li>
    									<a href="<?php echo get_permalink( $query->post_id ); ?>">
    										<img src="<?php echo $photo?>" width="65" />
    										<?php echo get_the_title( $query->post_id ); ?>
    									</a></li>
    							<?php endforeach; ?>
    							</ul>
    						<?php endif;

    There is a way to know the index of the row of every selected field, or something that can output the other subfields in the same row automatically? Do you know how I can achieve this? Thank you.

  • WP Job Manager has a 3 step function to create post: the first step is the form submission and when you hit the preview button the post is saved as a draft (wpjm “preview” post) and you are redirected to a preview of the post, which is the second step; from the second step you can submit the post publishing the draft or go back to the editing part. The third step is a redirect to a confirmation page.
    I’ve already tried declaring the post id as new_post in the form array, but it’s not working as I need.

    The front end editing is a single step process that updates the post_meta, but when I try to insert the acf form it uses the front end page id instead of the job id.

    I modified the preview step inserting the acf form and it saves everything fine (I think because it call the job post inside the preview so acf knows what is the postid) but stop the php function that create the submission confirmation page.
    Also if i try to edit the job in the front end because it is a one step process the preview isn’t shown so I can’t edit the acf form.

  • I’ve already included the form=>false argument.

    This is the code I’m using

    acf_form(array(
    'field_groups' => array(12116),
    'form' => false	));

    but it isn’t working

Viewing 3 posts - 1 through 3 (of 3 total)