Support

Account

Forum Replies Created

  • This reply has been marked as private.
  • thanks for reply and great supported. i tried your code and also tweak also some. but value not coming P and img tag coming empty if i remove if (get_field and if i add if (get_fieldthen tag also not come.

    i attached one jpg please check

  • thanks for response but can you help me for full query please. i am not so expert on query writing

    i want loop then html template like

    <li><h4>category title</h4><div class="thmubnail"> custom filed image </div> <div class="shottxt">custome filed text</div></li>

  • thanks you so much James. it is work. i found out. that my files issue. problem solve

  • thanks.. this work. but strange i tried two different site one is work another not..

    any idea why

  • thank you very much both of you. i am now learning and trying.if i can fix then i will keep update here

  • Thank you much your great support. i tried many way but form even not come. tried something totally group filed form only if i make Show this field group if as page template but that way i think don’t work.

    my function.php even don’t have much work. i removed all code from function.php for test and keep acf code and css and jquery load code.. but result is same.

    thanks you again.

    can you tell where i can send mail for support. i email already support about it many time but not really response . i gave them my site info also for testing..

  • thanks.

    actuall group id not wrong. normally can not see full id. because input filed size was set in 13 that’s why show only 13 digit. but when you select the input filed value then it is select full value . i even try with your id but it is same.

    for just information i made screenshot from admin and remove input size 13, now u can see full id

  • Thanks for quick reply.

    group id i copy and paste from group_559b4ee335078 slug. and my

    Show this field group if setting is

    is there any way can check in my site. i can send site details. but don’t want to post open in public

  • @John Huebner . i am sorry for not posting code. actually code post my previous post. thank you so much for your support. it is really great for us.

    actually i made ticket support with my site details. but support still not response. it about two days i think.

    i change new to new_post all id same now but in front end Form even not come. just come Update Button

    <?php acf_form_head(); ?>
    <?php 
    /*
    Template Name: Application
    */
    get_header(); ?>
    
    <div id="primary">
      <div id="content" role="main">
        <?php 
        $args = array(
            'field_groups' => array('group_559b4ee335078'), // Field Group name
            'post_id' => 'new_post',
            'new_post' => array(
                'post_type' => 'post',
                'post_status' => 'draft'
             ),
            'submit_value' => 'Submit Application'
        );
        acf_form(); 
    ?>
      </div>
      <!-- #content --> 
    </div>
    <!-- #primary -->
    
    <?php get_footer(); ?>
    

    function.php

    function my_pre_save_post( $post_id ) {
    
        // check if this is to be a new post
        if( $post_id != 'new_post' ) {
            return $post_id;
     	}
    	
        // Create a new post
        $post = array(
            'post_status'  => 'draft' ,
            'post_title'  => 'A title' ,
            'post_type'  => 'post',
        );  
    
        // insert the post
        $post_id = wp_insert_post($post); 
    
        $category_id = 3; // change this to your category ID
        wp_set_post_categories($post_id, array($category), false);
        // see WP codex for more information on wp_set_post_categories
    
        // return the new ID
        return $post_id;
    
    }
    
    add_filter('acf/pre_save_post' , 'my_pre_save_post', 10, 1 );
  • problem solve. i made it. code bellow

          <?php 
    	while ( have_posts() ) :
    	the_post();
    	?>
          <h2><a href="<?php  the_permalink(); ?>">
            <?php  the_title(); ?>
            </a></h2>
          <?php
    $images = get_field('gallery_picture');
    $max = 5;
    $i = 0;
    
    if( $images ): ?>
          <ul>
            <?php foreach( $images as $image ): $i++; ?>
            <?php if( $i > $max){ break; } ?>
            <li> <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" /> </li>
            <?php endforeach; ?>
          </ul>
          <?php endif; ?>
          <a href="<?php  the_permalink(); ?>" class="info">Gallery</a> </div>
        <?php  endwhile; ?>
  • i was looking for same code…Thanks. this code help me too. and it is work

  • thanks for respone. i tried wil group slug but not success. i attached all code screenshot. i sent my site details to support for check. i think if they see a bit problem will be fast. i have limited knowledge about php coding that’s why i ask so much question.

    application.php
    page-application.php

    function.php

    function.php

    WordPress admin

    wordpess admin

    front end result

    front end

    would you please see my issue.

  • what i want to do ??

    i have one category Members for that i already create custom field . when you create any new post if you select category Mambers then members filed will show. this is fine working

    now i want i will have one member application form in front end. example http://xxxxx.com/application-form/ same filed as member category filed. so when anyone fill and submit then it will save under Members category and draft mode. so later admin can review and make that publish. also if possible want to add form validation or capture for protection spam.

  • thanks for quick response.. now no error. but not work. what is happening now let me explain you.

    did you see Show this field group if screenshot shot. if like that then form coming with value which i added last time. but i don’t know where those data add before. i never see any post like this in whole WordPress. so from that data coming i don’t know.

    but if Show this field group if setting different then form also no coming. same problem i face before.

    i sent already my site details to support to look at this. but never headed back yet. i am not you are from that support team or separate person. if you support them then would you please check this thing. it really impotent for me make this work. because similar for front end form submission i have more work. that’s why i want to upgrade my licences too.

  • giving error. i think it is sytex error screenshot

    <?php acf_form_head(); ?>
    <?php 
    /*
    Template Name: Application
    */
    get_header(); ?>
    
    <div id="primary">
    		<div id="content" role="main">
    
    			<?php 
        $args = array(
            'field_groups' => array('members-field')), // Field Group name
            'post_id' => 'new_post',
            'new_post' => array(
                'post_type' => 'post',
                'post_status' => 'draft'
             ),
            'submit_value' => 'Submit Application'
        );
        acf_form(); 
    ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
        
        
    
    <?php get_footer(); ?>

    page-application.php on line 15

    in function bellow code also show error

     if( $post_id != 'new' ) {
            return $post_id
     	}

    but i made it like

     if( $post_id != 'new' ) {
            return $post_id;
     	}
    	

    now no error showing.

    i am sorry to say i am not so expert on php code yet. that’s why may be can not fix small small think.

    would you please see what’s wrong code

    also please see my screenshot from admin screenshot

    Show this field group if this setting ok or not ?

  • i did.. not work. i added

    function my_pre_save_post( $post_id ) {
    
        // check if this is to be a new post
        if( $post_id != 'new' ) {
    
            return $post_id
    
        }
    
        // Create a new post
        $post = array(
            'post_status'  => 'draft' ,
            'post_title'  => 'A title, maybe a $_POST variable' ,
            'post_type'  => 'post' ,
        );  
    
        // insert the post
        $post_id = wp_insert_post( $post ); 
    
        // return the new ID
        return $post_id;
    
    }
    
    add_filter('acf/pre_save_post' , 'my_pre_save_post', 10, 1 );
    

    this to in function.php too it show me error line 120. which is `
    return $post_id
    }`

    my template file code is

    			<?php 
        $args = array(
            'field_groups' => array('members-field')), // Field Group name
            'post_id' => 'new_post',
            'new_post' => array(
                'post_type' => 'members ',  // category name
                'post_status' => 'draft'
             ),
            'submit_value' => 'Submit Application'
        );
        acf_form(); 
    ?>

    still waiting for support ticket response

  • i tried already base on ref. link already but not success yet. may be i am missing something. i already made support ticket with my site details. also i am still trying.. let see. i will keep update

  • @jonathan thanks 🙂 i made another also in PRO section

  • thank u so much @jonathan … big thanks. it is perfectly work. i also paste working and test coding bellow

    <?php 
    $args = array(
    	'cat' => 'events',
    	'posts_per_page' => 2,
    	'orderby' => 'meta_value_num',
    	'order'	=> 'ASC',
    	'meta_type' => 'DATE',
    	'meta_key' => 'date'
    	
    );
    $news = new WP_Query($args); 
    ?>
    <?php while ($news->have_posts()) : $news->the_post(); ?>
    	<li>
    		<h3><?php the_field('date'); ?></h3>
    		<h4><?php the_title(); ?></h4>
    	</li>
    <?php endwhile; ?>
  • same my case too. i got confuse what happen my WordPress. but after see this post i got clear. this is bug

    WP 4.1.1 & ACF 5.2.0

  • i have another issue. how can i print selected select box label on page. say like my url is http://your-domain.com/page-that-displays-posts/?value=CK

    i want to print on page <h1>CK</h1>

    i tried with <h1> <?php echo $value; ?> </h1> i come ok. no problem. but it come CK which is select value. but i want to print label. CK label is CK Sunglass so i want to inside h1 will print selected value lable . is that possible ?

  • thanks it work fine 🙂 quick and great support

  • thanks for reply. i will and keep update post here. thanksa gain

Viewing 25 posts - 26 through 50 (of 50 total)