Support

Account

Forum Replies Created

  • Thanks, I will checkout this

  • It is a directory based website, so companies will list and edit their data from the front end only.

    If I go with a hierarchical post type where the top level post was the “Provider” and each “Plan” was a child post, how to link these parent and child post from front end form.

    really I am struggling here, would you provide me some ideas, what is the best way to start this.

    The data will be submitted and edited by companies from the front-end, they can’t access back-end.

    My main post type is Broadband Company, it has all the data with broadband plans.

    FIRST GOAL
    I want to create a two archive pages ONE for Broadband companies and SECOND is Broadband plans, the two archive pages have filters with acf data.

    SECOND GOAL
    Single broadband page with company data and all it’s broadband plans and user reviews

    I can create archive pages with filters and single company data with plans (If I use Repeater fields for Plans)

    If I use child post for plans, how company will submit the plan from front end. And in plans archive page user click on any page he will redirect to company page not to plan page.

    And users will review the company in single company page in review form he can select which plan (dynamically populate from the plans) is he going to review.

    So which one is best, relationship post types or parent and child post or repeater fields.

    The main problem to me is front end forms and user review forms.

    I don’t want to start this in wrong way.

    Would you provide me some ideas.

  • Thanks for the reply.

    It seems very difficult, because i’m not an expert. But I got your point I need to assign an ID to each row (add an unique ID to each row dynamically.). I will try this.

    Is there any other good solution for this, like using flexible content fields or relationship fields over repeater field.

  • Hello, Please Post your code here. I will check and give the solution.

  • I am using this code <?php posts_nav_link(); ?> to get the pagination but not working, I am trying to solve this from so many days but no result please help on this.

    And I am displaying upcoming events in a seperate page using custom template file.

    And I have taken the code from this resource – https://www.advancedcustomfields.com/resources/date-time-picker/

    How to get working pagination for this? Please help.

  • Is there any solution for this? Any help.

  • Hi I have tried this for active events, featured is coming first ok but the date orderby is not working (after featured events latest posted events coming next)

    // find date time now
    				$date_now = date('Y-m-d H:i:s');
    
    				// query events
    				$posts = get_posts(array(
    					'posts_per_page'	=> -1,
    					'post_type'			=> 'event',
    					'meta_query' 		=> array(
    						'date_clause'	=> array(
    						'relation' 			=> 'AND',
    							array(
    								'key'			=> 'start_date',
    								'compare'		=> '<=',
    								'value'			=> $date_now,
    								'type'			=> 'DATETIME'
    							),
    							array(
    								'key'			=> 'end_date',
    								'compare'		=> '>=',
    								'value'			=> $date_now,
    								'type'			=> 'DATETIME'
    							)
    						),
    						'feature_clause'	=> array(
    						'key'				=> 'featured',
    						'compare'			=> 'EXISTS'
    						)
    					),
    					'orderby'			=> array(
    					'feature_clause'	=> 'DESC',
    					'date_clause'		=> 'ASC'
    					)
    				)); 

    Please help on this (I want to show featured events first next active events based on end date first)

    Please help on this

  • <?php
    			// query events order
    			$posts = get_posts(array(
    				'posts_per_page'	=> -1,
    				'post_type'			=> 'event',
    				'meta_query'		=> array(
    					'date_clause'		=> array(
    						'key'				=> 'start_date',
    						'compare'			=> 'EXISTS'
    					),
    					'feature_clause'	=> array(
    						'key'				=> 'featured',
    						'compare'			=> 'EXISTS'
    					)
    				),
    				'orderby'			=> array(
    					'feature_clause'	=> 'DESC',
    					'date_clause'		=> 'ASC'
    				)
    			));
    
    			if( $posts ): ?>
    				<div class="events-list">
    					<?php foreach( $posts as $p ): ?>
    						<div><h2><a href="<?php echo get_permalink( $p->ID ); ?>"><?php echo $p->post_title; ?></a></h2></div>
    						<div><?php the_field('start_date', $p->ID); ?></div>
    						<div><?php the_field('end_date', $p->ID); ?></div>
    					<?php endforeach; ?>
    				</div>
    			<?php endif; ?>

    I have write the code like this and it’s working (is it correct?)

    And Thank you very much.

  • Hi,

    I am confused between the keys and values.

    Would you give some example code to achieve this.

    Thanks.

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