Jump to content

BenDains

New Members
  • Posts

    4
  • Joined

  • Last visited

BenDains's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just wanted to bump this so you all could see it again, not sure if everyone was able to read my last comment. I'll only bump once.
  2. Alright, so I have tried so many different things. I am not sure what I am doing wrong and I am kind of going insane.. This is the code for header.php and I highlighted where I the form to go. <?php $class = 'no-cover'; if ( is_front_page() || is_archive() || is_search() || is_home() ) { $class = 'cover'; } if ( is_single() ) { $post_thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ); if ( ! empty($post_thumbnail_url) ) { $class = 'cover'; ?> <style> .banner.cover { background-image: url( <?php echo $post_thumbnail_url; ?> ); } </style> <?php } } ?> <header class="banner <?php echo $class ?>" role="banner"> <div class="header-inner"> <nav class="nav-main" role="navigation"> <div class="container"> <?php if (has_nav_menu('primary_navigation')) : wp_nav_menu(array('theme_location' => 'primary_navigation', 'menu_class' => 'nav navbar-nav')); endif; ?> </div> </nav> <?php if( is_front_page() || is_archive() || is_home() ) : ?> <hgroup> <div class="container"> <h1 class="page-title"> <?php echo dw_timeline_title(); ?> </h1> <h2 class="page-description"><?php bloginfo('description'); ?></h2> Im trying to get it to appear here ----------------------------------- <button id="get-started" class="btn btn-default btn-coner"><?php echo dw_timeline_get_theme_option('get_start','Get Start Now') ?></button> </div> </hgroup> <?php elseif( is_search() ) : ?> <div class="container"> <h1 class="page-title"> <?php echo dw_timeline_title(); ?> </h1> </div> <?php endif; ?> </div> </header> and this is the stupid HTML from MailChimp <!-- Begin MailChimp Signup Form --> <link href="//cdn-images.mailchimp.com/embedcode/slim-081711.css" rel="stylesheet" type="text/css"> <style type="text/css"> #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } /* Add your own MailChimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ </style> <div id="mc_embed_signup"> <form action="http://hulkapps.us6.list-manage2.com/subscribe/post?u=0ae3bf2251c52f99a359c13c2&id=32aad6d49f" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> <label for="mce-EMAIL">Subscribe to our mailing list</label> <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> <div style="position: absolute; left: -5000px;"><input type="text" name="b_0ae3bf2251c52f99a359c13c2_32aad6d49f" value=""></div> <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div> </form> </div> <!--End mc_embed_signup--> I do not want anyone to write it the code for me because I am trying to learn, but this one has me stumped.. :/ Because this theme doesn't support a form at the place I want to put it, if that makes sense. But then again, I could be just a dumb newbie and I am making this WAY TO COMPLICATED. Haha.
  3. Thanks for the great answers! Just to be clear, it IS easier to just use the "include()" command? After you explained it, that does make sense. Just speaking openly, I should create very basic html page which has my form, and then "include()" it in my header.php?
  4. Good afternoon everyone, I am 24 and I just started my first website (yay me, right) and I had a small question in regards to PHP. I am editing a Wordpress template (don't worry i've already made a child theme and copied the header.php), but I want to add (embed) an HTML form (I am using MailChimp as my newsletter & mailing service) into my header.php I am unsure which way to go about this problem and I wanted some excellent advice from the pros (you all!). After researching the problem I have concluded there are two ways to accomplish this (remember I am a newbie and there are probably more ways to accomplish this task, ha ha). 1. Use the PHP Command - Echo to write the code into the header.php but I feel that would be a lot of Echo commands (and it may not be because I don't know very much about PHP). 2. Create a new function.php file that houses my "Newsletter Form" and use PHP to call that function (and now that I am typing this, it probably isn't a "function" file and its named something else) into my header.php and have it display that way. This is my website: www.hulkapps.com The "Newsletter Form" should appear under the site description ("We Make College Easier"). Thank you in advance for all responses, and taking the time to read my post. Have a great day, Ben @ HulkApps
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.