Community Forums › Forums › Archived Forums › Design Tips and Tricks › Custom Template
Tagged: custom template, custom theme, PHP Code
- This topic has 6 replies, 2 voices, and was last updated 10 years, 9 months ago by David Chu.
-
AuthorPosts
-
June 25, 2013 at 10:41 am #47673SerenityMember
I have a registration form from another theme that I purchased and I didn't know if it is possible to use it in one of my genesis themes that I have as well. Here is the code: `<?php
// Template Name: Register// set a redirect for after logging in
if ( isset( $_REQUEST['redirect_to'] ) ) {
$redirect = $_REQUEST['redirect_to'];
}
if (!isset($redirect)) $redirect = home_url();
?><div id="main" class="list">
<div class="section-head">
<h1><?php _e( 'Register', APP_TD ); ?></h1>
</div><?php do_action( 'appthemes_notices' ); ?>
<?php if ( get_option('users_can_register') ) : ?>
<form action="<?php echo appthemes_get_registration_url(); ?>" method="post" class="login-form register-form" name="registerform" id="login-form"><p><?php _e('Complete the fields below to register.', APP_TD ) ?></p>
<fieldset>
<div class="form-field">
<label>
<?php _e('Username:', APP_TD ) ?>
<input tabindex="1" type="text" class="text required" name="user_login" id="user_login" value="<?php if (isset($_POST['user_login'])) echo esc_attr(stripslashes($_POST['user_login'])); ?>" />
</label>
</div><div class="form-field">
<label>
<?php _e('Email:', APP_TD ) ?>
<input tabindex="2" type="text" class="text required email" name="user_email" id="user_email" value="<?php if (isset($_POST['user_email'])) echo esc_attr(stripslashes($_POST['user_email'])); ?>" />
</label>
</div><div class="form-field">
<label>
<?php _e('Password:', APP_TD ) ?>
<input tabindex="3" type="password" class="text required" name="pass1" id="pass1" value="" autocomplete="off" />
</label>
</div><div class="form-field">
<label>
<?php _e('Password Again:', APP_TD ) ?>
<input tabindex="4" type="password" class="text required" name="pass2" id="pass2" value="" autocomplete="off" />
</label>
</div><div class="form-field">
<div id="pass-strength-result" class="hide-if-no-js"><?php _e('Strength indicator'); ?></div>
<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).', APP_TD ); ?></p>
</div><?php
// include the spam checker if enabled
//appthemes_recaptcha();do_action('register_form');
?><div class="form-field">
<input type="hidden" name="redirect_to" value="<?php echo esc_attr($redirect); ?>" />
<input tabindex="30" type="submit" class="btn reg" id="register" name="register" value="<?php _e('Register', APP_TD ); ?>" />
</div></fieldset>
<!-- autofocus the field -->
<script type="text/javascript">try{document.getElementById('user_login').focus();}catch(e){}</script>
</form><?php else: ?>
<h3><?php _e('User registration has been disabled.', APP_TD); ?></h3>
<?php endif; ?>
</div><div id="sidebar">
<?php get_sidebar( app_template_base() ); ?>
</div>`Any help implementing those fields in my genesis theme would be greatly appreciated.
Thanks a lot.
John
“ First, solve the problem. Then, write the code. ”
June 25, 2013 at 11:50 am #47684David ChuParticipantHi,
From the outside, it looks very unlikely that this could be converted easily. It looks like lots of proprietary App Themes functions and code in there. I just looked at their website, and their cloud hosting is choking right now, so I can't look around. I'm guessing that their "loving 20,000 customers" might not like that. 🙂If it's a plugin that utilizes this code, you could try installing it on a Genesis site. If it's part of an App Theme per se, I'd say you're out of luck.
That being said, there are certainly various good form generation plugins out there, like Gravity Forms, Formidable, and free stuff, or plugins more specifically for Registration.
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
June 25, 2013 at 11:52 am #47685SerenityMemberThank you David. You are so kind to answer my complicated question. I have thought about plugins but I'm trying to avoid them as much as I could. Too many plugins are just going to slow down my website. The reason I like some of App theme functions is the way it is displayed for clients to register.
Thanks a lot again David.
John
“ First, solve the problem. Then, write the code. ”
June 25, 2013 at 1:15 pm #47692David ChuParticipantJohn,
Glad that was useful. Avoiding having too many plugins is sensible. I have a regular client who uses so many that it's scary. Still, plugins drastically differ, and some plugins would have very little effect on speed, if any. But WordPress lives and dies by plugins, so a middle ground is needed.Working with WP means learning to live with plugins - many types of functionality require it. Form processing is complex, and it's likely you'll need one to handle any custom forms. Can someone add functionality without using plugins? Absolutely! But it's still PHP programming, and that's what plugins use, so to some degree, it's 6 of one, half-a-dozen of the other.
Good luck, Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
June 25, 2013 at 2:56 pm #47710SerenityMemberThank you David, You guys are awesome! To Plugins we go....
John
“ First, solve the problem. Then, write the code. ”
June 25, 2013 at 3:01 pm #47712SerenityMemberBTW, Should I start a new topic If I have a different question? I don't mind paying a fee if you could help me figure out a different issue/problem I'm having with genesis.
Let me know,
John
“ First, solve the problem. Then, write the code. ”
June 25, 2013 at 4:02 pm #47720David ChuParticipantYes, you'll want to have a new topic in a new thread. If you'd like to contact me about work, you can follow my link to my website.
Cheers, Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.