浏览代码

options, menu

Juan Carlos 5 年之前
父节点
当前提交
58cc805808
共有 3 个文件被更改,包括 148 次插入46 次删除
  1. 38 6
      footer.php
  2. 74 0
      functions.php
  3. 36 40
      header.php

+ 38 - 6
footer.php

@@ -8,6 +8,16 @@
         <div class="row section">
           <!-- Footer Widget Starts -->
           <div class="footer-widget col-lg-3 col-md-6 col-xs-12 wow fadeIn">
+
+
+
+            <?php
+             $options = get_option('rl_theme_options');
+             echo $options['kontakt'];
+            ?>
+
+
+            <!--
             <h3 class="small-title">
               About Us
             </h3>
@@ -15,10 +25,14 @@
               Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis veritatis eius porro modi hic. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
             </p>
             <div class="social-footer">
+
               <a href="#"><i class="fa fa-facebook icon-round"></i></a>
               <a href="#"><i class="fa fa-twitter icon-round"></i></a>
               <a href="#"><i class="fa fa-linkedin icon-round"></i></a>
-            </div>
+
+            </div> -->
+
+
           </div>
           <!-- Footer Widget Ends -->
 
@@ -28,16 +42,33 @@
               Links
             </h3>
             <ul class="menu">
-              <li><a href="#">About Us</a></li>
-              <li><a href="#">Services</a></li>
-              <li><a href="#">Works</a></li>
-              <li><a href="#">Pricing</a></li>
-              <li><a href="#">Contact</a></li>
+              <li><a href="#sliders">
+              Home
+              </a></li>
+              <li><a href="#about">
+              Geschäftsfelder
+              </a></li>
+              <li><a href="#portfolio">
+              Projekte
+              </a></li>
+              <li><a href="#team-section">
+              Team
+              </a></li>
+              <li><a href="#baugruppen">
+              Baugruppen
+              </a></li>
+              <li><a href="#clients">
+              Kunden
+              </a></li>
+              <li><a href="#footer">
+              Contact
+              </a></li>
             </ul>
           </div>
           <!-- Footer Widget Ends -->
 
           <!-- Footer Widget Starts -->
+<!--
           <div class="footer-widget col-lg-3 col-md-6 col-xs-12 wow fadeIn" data-wow-delay=".5s">
             <h3 class="small-title">
               GALLERY
@@ -51,6 +82,7 @@
               <a href="#"><img src="<?php echo get_template_directory_uri(); ?>/img/flicker/img6.jpg" alt=""></a>
             </div>
           </div>
+ -->
           <!-- Footer Widget Ends -->
 
           <!-- Footer Widget Starts -->

+ 74 - 0
functions.php

@@ -538,4 +538,78 @@ Testimonials
 
 
 
+
+
+
+
+
+/* ------------------ */
+/* theme options page */
+/* ------------------ */
+/* https://blog.kulturbanause.de/2011/11/theme-options-page-fur-wordpress-erstellen/ */
+
+add_action( 'admin_init', 'theme_options_init' );
+add_action( 'admin_menu', 'theme_options_add_page' );
+
+// Einstellungen registrieren (http://codex.wordpress.org/Function_Reference/register_setting)
+function theme_options_init(){
+	register_setting( 'rl_options', 'rl_theme_options', 'rl_validate_options' );
+}
+
+// Seite in der Dashboard-Navigation erstellen
+function theme_options_add_page() {
+	add_theme_page('Optionen', 'Optionen', 'edit_theme_options', 'theme-optionen', 'rl_theme_options_page' ); // Seitentitel, Titel in der Navi, Berechtigung zum Editieren (http://codex.wordpress.org/Roles_and_Capabilities) , Slug, Funktion
+}
+
+// Optionen-Seite erstellen
+function rl_theme_options_page() {
+global $select_options, $radio_options;
+if ( ! isset( $_REQUEST['settings-updated'] ) )
+	$_REQUEST['settings-updated'] = false; ?>
+
+<div class="wrap">
+<?php screen_icon(); ?><h2>Theme-Optionen für <?php bloginfo('name'); ?></h2>
+
+<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>
+<div class="updated fade">
+	<p><strong>Einstellungen gespeichert!</strong></p>
+</div>
+<?php endif; ?>
+
+  <form method="post" action="options.php">
+	<?php settings_fields( 'rl_options' ); ?>
+    <?php $options = get_option( 'rl_theme_options' ); ?>
+
+    <table class="form-table">
+
+      <tr valign="top">
+        <th scope="row">Google Analytics</th>
+        <td><textarea id="rl_theme_options[kontakt]" class="large-text" cols="50" rows="10" name="rl_theme_options[kontakt]"><?php echo esc_textarea( $options['kontakt'] ); ?></textarea></td>
+      </tr>
+    </table>
+
+    <!-- submit -->
+    <p class="submit"><input type="submit" class="button-primary" value="Einstellungen speichern" /></p>
+  </form>
+</div>
+<?php }
+
+// Strip HTML-Code:
+// Hier kann definiert werden, ob HTML-Code in einem Eingabefeld
+// automatisch entfernt werden soll. Soll beispielsweise im
+// Copyright-Feld KEIN HTML-Code erlaubt werden, kommentiert die Zeile
+// unten wieder ein. http://codex.wordpress.org/Function_Reference/wp_filter_nohtml_kses
+function rl_validate_options( $input ) {
+	// $input['copyright'] = wp_filter_nohtml_kses( $input['copyright'] );
+	return $input;
+}
+
+
+
+
+
+
+
+
+
 /* DON'T DELETE THIS CLOSING TAG */ ?>

+ 36 - 40
header.php

@@ -111,46 +111,42 @@
 
 			        <!-- Mobile Menu Start -->
 			        <ul class="mobile-menu navbar-nav">
-			          <li>
-			            <a class="page-scroll" href="#sliders">
-			              Home
-			            </a>
-			          </li>
-			          <li>
-			            <a class="page-scroll" href="#about">
-			              About
-			            </a>
-			          </li>
-			          <li>
-			            <a class="page-scroll" href="#services">
-			              Services
-			            </a>
-			          </li>
-			          <li>
-			            <a class="page-scroll" href="#portfolio">
-			              Portfolio
-			            </a>
-			          </li>
-			          <li>
-			            <a class="page-scroll" href="#feature">
-			              Features
-			            </a>
-			          </li>
-			          <li>
-			            <a class="page-scroll" href="#team">
-			              Team
-			            </a>
-			          </li>
-			          <li>
-			            <a class="page-scroll" href="#pricing">
-			              Pricing
-			            </a>
-			          </li>
-			          <li>
-			            <a class="page-scroll" href="#contact">
-			              Contact
-			            </a>
-			          </li>
+								<li>
+									<a class="page-scroll" href="#sliders">
+										Home
+									</a>
+								</li>
+								<li>
+									<a class="page-scroll" href="#about">
+										Geschäftsfelder
+									</a>
+								</li>
+								<li>
+									<a class="page-scroll" href="#portfolio">
+										Projekte
+									</a>
+								</li>
+								<li>
+									<a class="page-scroll" href="#team-section">
+										Team
+									</a>
+								</li>
+								<li>
+									<a class="page-scroll" href="#baugruppen">
+										Baugruppen
+									</a>
+								</li>
+								<li>
+									<a class="page-scroll" href="#clients">
+										Kunden
+									</a>
+								</li>
+								<li>
+									<a class="page-scroll" href="#footer">
+										Contact
+									</a>
+								</li>
+
 			        </ul>
 			        <!-- Mobile Menu End -->