Support

Account

Forum Replies Created

  • Thanks Eliot. I’m not sure what made me think that ACF would be different from standard WordPress PHP here – but thanks for being patient.

    Have a fabulous Christmas and a very healthy new year – and thanks again for this amazing plugin.

    Best wishes, Andrew.

  • Hi Eliot. Thanks for this. I’d not realised you’d responded as I received no notification of this response for some reason.

    Many thanks for the response – I’ll give that a go. Is there any way that this can be made to be dynamic – so that it works for whichever user is viewing the page (a hard-coded user ID won’t really be much good)?

    Thanks again for your time.

    Best wishes, Andrew.

  • Hi Elliot.

    Many thanks for your reply. At the moment I’ve just been trying to get it to work inside of twentythirteen so I rule out any theme issues. So it’s in the standard twentythirteen page (page-18.php to be precise, which is just a duplicate of page.php to try this code) with your code added. The shortcode for the WP User Frontend Pro form is included in the WP admin page editor and output (correctly) by the_content() as usual. I am using the acf_form_head function. The full page code is as follows:

    <?php
    
    acf_form_head();
    
    /**
     * The template for displaying all pages
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages and that other
     * 'pages' on your WordPress site will use a different template.
     *
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
     */
    
    get_header(); ?>
    
    	<div id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    
    			<?php /* The loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    					<header class="entry-header">
    						<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
    						<div class="entry-thumbnail">
    							<?php the_post_thumbnail(); ?>
    						</div>
    						<?php endif; ?>
    
    						<h1 class="entry-title"><?php the_title(); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<?php the_content(); ?>
    						<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    					</div><!-- .entry-content -->
    
    					<footer class="entry-meta">
    						<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
    					</footer><!-- .entry-meta -->
    				</article><!-- #post -->
    
    		
    			<?php endwhile; ?>
    
    <?php 	$args = array(
    				'user_id' => '2',
    				'field_groups' => array( 57 )
    			);
     
    			acf_form( $args ); 
    ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
Viewing 3 posts - 1 through 3 (of 3 total)