Add ultimate member form in php file

How can i add ultimate member forms in php template

  • Vaughan

    Hi Jimmy,

    As I stated earlier, Ultimate member is not our plugin, it's not aplugin we are familiar with. Have you asked the plugin developersat all? they would be able to give you more help on that as they will know their plugin a lot better than we do.

    https://ultimatemember.com/support/

    But if it's displaying 'array' and not the value, then it sounds like you need a foreach loop on the array value.

    Without seeing your whole code. I dunno

    Thanks

  • Vaughan

    It tells you on the page.

    you give get_user_meta the user_id you want the info for.

    <?php get_user_meta($user_id, $key, $single); ?>

    so if you want the currentuser id viewing the page.

    you would pass

    $current_user_id = get_current_user_id();
    $usermeta = get_user_meta($current_user_id, 'last_name', true);

    So then if you echo $usermeta it will display the current users last name, if you pass someone elses user_id it will display that users details

    I can't write you the code as I do not know what you are actually wanting codewise, whatis single-company.php template for?

    What does it do? As I say I have no idea about Ultimate member plugin at all.

    You are asking me to write some code, but you are not telling me exactly what you want this code to actually display or do.

    Thanks

  • Jimmy

    Its for wp job manager company profile
    I want to show the people who sign up form their value is stored in meta value, they all gets a page so i want these values to show on their page visible to everyone
    How can i do that?
    this pages are run by single-company.php
    What code i enter there
    I want meta value from meta key to diaplayed in their profile pages, what code i enter in that php file

  • Jimmy
    <?php
    /**
     * Single Post
     *
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package Jobify
     * @since Jobify 1.0
     */
    
    get_header(); ?>
    
    <body>
    <div id="mainwrapper">
      <header>
        <!--**************************************************************************
        Header starts here. It contains Logo and 3 navigation links.
        ****************************************************************************-->
        <div id="logo">
    											<?php the_company_logo( 'medium' ); ?>
    
    </div>
        <nav><?php printf( __( '%s', 'jobify' ), get_the_company_name() ); ?>
    
    </nav>
    
      </header>
    <form class="job-manager-application-form job-manager-form" method="post" enctype="multipart/form-data"  action="<?php echo esc_url( get_permalink() );?>">
    
    	<?php do_action( 'job_application_form_fields_start' ); ?>
    
    	<?php foreach ( $application_fields as $key => $field ) : ?>
    		<?php if ( 'output-content' === $field['type'] ) : ?>
    			<div class="form-content">
    
    				<?php if ( ! empty( $field['description'] ) ) : ?><?php echo wpautop( wp_kses_post( $field['description'] ) ); ?><?php endif; ?>
    			</div>
    		<?php else : ?>
    			<fieldset class="fieldset-<?php esc_attr_e( $key ); ?>">
    				<label for="<?php esc_attr_e( $key ); ?>"><?php echo __( $field['label'] ) . apply_filters( 'submit_job_form_required_label', $field['required'] ? '' : ' <small>' . __( '(optional)', 'wp-job-manager' ) . '</small>', $field ); ?></label>
    							</fieldset>
    <div class="field " <?php echo $field['required'] ? 'required-field' : ''; ?>>
    					<?php $class->get_field_template( $key, $field ); ?>
    				</div>
    
    		<?php endif; ?>
    	<?php endforeach; ?>
    
    	<?php do_action( 'job_application_form_fields_end' ); ?>
    
    			<input type="submit" class="button wp_job_manager_send_application_button" value="<?php esc_attr_e( 'Apply Now', 'wp-job-manager-applications' ); ?>" />
    		<input type="hidden" name="wp_job_manager_send_application" value="1" />
    		<input type="hidden" name="job_id" value="<?php echo absint( $post->ID ); ?>" />
    	</p>
    </form>
    
      <div id="content">
        <div class="notOnDesktop">
          <!-- This search box is displayed only in mobile and tablet laouts and not in desktop layouts -->
          <input type="text" placeholder="Search">
        </div>
    
        <section id="mainContent"> <div id="desc">
          <!--************************************************************************
        Main Blog content starts here
        ****************************************************************************-->
          <h1><?php printf( __( 'About %s', 'jobify' ), get_the_company_name() ); ?></h1></div>
          <h3> <? the_company_field('company_description')?> </h3>
          <div id="bannerImage"><?php echo jobify_get_the_featured_image(); ?>
    
    </div>
      <div id="employ">
    <aside id="authorInfo">
     <h3><b>Employment Details</b></h3>
    
                        </aside>
    
          <footer>
          <!--************************************************************************
        Footer starts here
        ****************************************************************************-->
          <article>
     <b>Available Positions:</b><?php
    $usermeta = get_user_meta($current_user_id, 'company_name', true);?>
    
    <?php
    // Use shortcodes in form like Landing Page Template.
    echo do_shortcode( '[pp-tabs field=apt]' );
    ?>
    
    <?php get_user_meta('zip'); ?>
    
    <? the_company_field( 'equipment_type_hired');?>
    
    	<?php echo do_shortcode( '[pp-tabs field=company_name label=1]' );?>
    
    <?php echo do_shortcode("[user_email]");?>
    <?php
    // Use shortcodes in form like Landing Page Template.
    
    echo do_shortcode( '[pp-tabs field="logo"]' );
    php?>
    <?php
    $display_name=um_user('display_name');
     echo $display_name;
     ?><hr color="white">
    <b>Type of Employment Offered:</b> <? the_custom_field('employment_offered')?><hr color="white">
    <b>Required Endorsements</b><? the_custom_field('required_endorsements')?><hr color="white">
    <b>Min. age of driver :</b><? the_company_field('driver_age')?><hr color="white">
    <b> Equipment Experience Accepted :  </b><? the_custom_field('equipment_experience_accepted')?><hr color="white">
    <b> Min. experience required (months):  </b><? the_custom_field('driver_experience')?>
    <hr color="white">
    <b> CDL Class type :  </b><? the_custom_field('cdl_class_type')?><hr color="white">
    
     </article>
          <article  <b> Will you hire a driver who has had their license suspended or revoked? :  </b>  <? the_custom_field('license_revoked')?>
    <hr color="white">
    <b> Will you hire a driver who has received a DWI or DUI? :  </b><? the_custom_field('dui')?>
    <hr color="white">
    <b> Will you hire a driver who has been convicted of a felony? : </b><? the_custom_field('convicted')?>
    <hr color="white">
    <b> Paid orientation :  </b><? the_custom_field('paid_orientation')?>
    <hr color="white">
    <b> Spouse rider program :  </b><? the_custom_field('spouse_rider_program')?>
    <hr color="white">
    <b> Child rider program :  </b><? the_custom_field('child_rider_program')?>
    <hr color="white">
    <b> Pets:  </b><? the_custom_field('pets')?>
    <hr color="white">
    
     </article>
    <div id="footerbar"><!-- Small footerbar at the bottom --></div>
    
        </footer>
    </div>
    <footer>
          <!--************************************************************************
        Footer starts here
        ****************************************************************************-->
          <article>
    
            <h3>Pay Information for Company Drivers</h3>
    
     </article>
          <article>
    
            <h3>Pay Information for Owner Operators</h3>
    
     </article>
    
        </footer>
    
        </section>
    
        <section id="sidebar"> <div id="address">
          <!--************************************************************************
        Sidebar starts here. It contains a searchbox, sample ad image and 6 links
        ****************************************************************************-->
    <p><? the_custom_field('street')?></p>
    <? $street=um_user($street);?>
    <p><? the_custom_field('state')?></p>
    <p><? the_custom_field('apt')?> </p>
    <p><? the_custom_field('city')?></p>
    <p><? the_custom_field('state')?></p>
    <p><? the_custom_field('zip')?></p>
    <p><? the_custom_field('user_email')?></p>
    <p><? the_custom_field('office_number')?></p>
    <p><? the_custom_field('fax')?></p>
    <p><? the_widget( 'Jobify_Widget_Job_Company_Social',$args );?></p>
    </div>
    
          <div id="adimage">
    
    <img src="BlogPostAssets/images/300x250.gif" alt=""/></div>
          <nav>
            <ul>
              <li><a href="#" title="Link">Link1</a></li>
              <li><a href="#" title="Link">Link2</a></li>
              <li><a href="#" title="Link">Link3</a></li>
              <li><a href="#" title="Link">Link4</a></li>
              <li><a href="#" title="Link">Link5</a></li>
              <li><a href="#" title="Link">Link6</a></li>
     <li><a href="#" title="Link">Link1</a></li>
              <li><a href="#" title="Link">Link2</a></li>
              <li><a href="#" title="Link">Link3</a></li>
              <li><a href="#" title="Link">Link4</a></li>
              <li><a href="#" title="Link">Link5</a></li>
              <li><a href="#" title="Link">Link6</a></li>
    
            </ul>
          </nav>
        </section>
         </div>
    
    </div>
     <footer>
          <!--************************************************************************
        Footer starts here
        ****************************************************************************-->
          <article>
            <h3>Footer1</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
          </article>
          <article>
            <h3>Footer2</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
          </article>
    
        </footer>
      </div>
      <div id="footerbar"><!-- Small footerbar at the bottom --></div>
    </div>
    
    </body>
    </html>
    
    	<?php the_post(); ?>">
    	<header class="page-header">
    <h1 class="page-title"><?php printf( __( 'Jobs at %s', 'jobify' ), esc_attr( urldecode( get_query_var( apply_filters( 'wp_job_manager_companies_company_slug', 'company' ) ) ) ) ); ?></h1>
    
    		<h2 class="page-subtitle"><?php printf( _n( '%d Job Available', '%d Jobs Available', $wp_query->found_posts, 'jobify' ), $wp_query->found_posts ); ?> </h2>
    	</header>
    	<?php rewind_posts(); ?>
    
    	<div id="primary" class="content-area">
    		<div id="content" class="container" role="main">
    
    			<div class="company-profile row">
    				<?php if ( jobify_get_the_company_description() ) : ?>
    				<div itemscope itemtype="http://data-vocabulary.org/Organization" class="col-xs-12 job-company-about">
    					<h2 class="widget-title widget-title--job_listing-top" itemprop="name"><?php printf( __( 'About %s', 'jobify' ), get_the_company_name() ); ?></h2>
    
    					<?php jobify_the_company_description(); ?>
    				</div>
    				<?php endif; ?>
    
    				<div class="company-profile-jobs col-md-10 col-sm-8 col-xs-12">
    					<?php if ( have_posts() ) : ?>
    					<div class="job_listings">
    						<ul class="job_listings">
    							<?php while ( have_posts() ) : the_post(); ?>
    								<?php get_job_manager_template_part( 'content', 'job_listing' ); ?>
    							<?php endwhile; ?>
    						</ul>
    					</div>
    					<?php else : ?>
    						<?php get_template_part( 'content', 'none' ); ?>
    					<?php endif; ?>
    				</div>
    
    				<div class="company-profile-info job-meta col-md-2 col-sm-4 col-xs-4">
    
    					<article class="widget widget--job_listing">
    						<?php the_company_logo( 'fullsize' ); ?>
    					</article>
    
    					<article class="widget widget--job_listing">
    
    						<h3 class="widget-title widget-title--job_listing"><?php _e( 'Company Details', 'jobify' ); ?></h3>
    
    						<ul class="job_listing-company-social company-social">
    							<?php do_action( 'job_listing_company_social_before' ); ?>
    
    							<?php if ( get_the_company_website() ) : ?>
    							<li><a href="<?php echo esc_url( get_the_company_website() ); ?>" target="_blank" itemprop="url" class="job_listing-website">
    								<?php _e( 'Website', 'jobify' ); ?>
    							</a></li>
    							<?php endif; ?>
    
    							<?php if ( get_the_company_twitter() ) : ?>
    							<li><a href="<?php echo esc_url( jobify_get_the_company_twitter() ); ?>" target="_blank" class="job_listing-twitter">
    								<?php _e( 'Twitter', 'jobify' ); ?>
    							</a></li>
    							<?php endif; ?>
    
    							<?php if ( jobify_get_the_company_facebook() ) : ?>
    							<li><a href="<?php echo esc_url( jobify_get_the_company_facebook() ); ?>" target="_blank" class="job_listing-facebook">
    								<?php _e( 'Facebook', 'jobify' ); ?>
    							</a></li>
    							<?php endif; ?>
    
    							<?php if ( jobify_get_the_company_gplus() ) : ?>
    							<li><a href="<?php echo esc_url( jobify_get_the_company_gplus() ); ?>" target="_blank" class="job_listing-googleplus">
    								<?php _e( 'Google+', 'jobify' ); ?>
    							</a></li>
    							<?php endif; ?>
    
    							<?php if ( jobify_get_the_company_linkedin() ) : ?>
    							<li><a href="<?php echo esc_url( jobify_get_the_company_linkedin() ); ?>" target="_blank" class="job_listing-linkedin">
    								<?php _e( 'LinkedIn', 'jobify' ); ?>
    							</a></li>
    							<?php endif; ?>
    
    							<?php do_action( 'job_listing_company_social_after' ); ?>
    						</ul>
    					</article>
    
    				</div>
    
    			</div>
    		</div><!-- #content -->
    
    		<?php do_action( 'jobify_loop_after' ); ?>
    
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>
  • Vaughan

    That's a lot of code.

    I do see a lot of short openphp tags

    <?

    These should all be replace with

    <?php

    You may need some echo in front of the custom field options & ending with a semi-colon, for example:

    <b>Type of Employment Offered:</b> <?php the_custom_field('employment_offered')?>

    Try changing to:

    <b>Type of Employment Offered:</b> <?php echo the_custom_field('employment_offered'); ?>

    But for this it looks like you might actually need a developer to do all this for you as they would need to familiarise themselves with the plugin itself. We do have a jobs board here if you wish to advertise for a developer who could do this for you.

    https://premium.wpmudev.org/wordpress-development/

    Hope this helps

  • Vaughan

    Hi,

    Try it in your template. I can't test as I don't have the plugin at all.

    When you say it doesn't work, does it display an error or just do nothing?

    What URL is using this template? so I can view the actual page on the site Where all this is meant to be displayed.

    Can you send your details using the following contact form (select i have a different question from the dropdown.) alternatively you can email direct to contact@wpmudev.org

    https://premium.wpmudev.org/contact/

    Mark for attn: Vaughan
    Include a ref URL to this thread.

    Please include the following details;
    - Site login details (super-admin if on multisite)
    - FTP login details so I can take a look at the theme/plugin files.

    Thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.