• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • PSD to Genesis
  • Personalized Genesis Child Theme
  • Custom Website
  • Rainmaker
  • Genesis Customizations

Christoph Herr

Solutions For Your Online Business

  • Home
  • Articles
  • Recommendations
  • About
  • Praise
  • Contact
  • Schedule a Call

Sample code for a plugin to store functions in

Last updated on July 7, 2016 by Christoph Herr Leave a Comment

Two days ago I wrote about how to use remove_actions in a plugin.

I was asked what the code for a plugin to store functions in look slike.

It is really simple to create a plugin. The WordPress codex provides us with all the information needed here.

In the example below, I kept the code from the above tutorial.

<?php
/**
 * Plugin Name: Functional Plugin
 * Plugin URI: https://www.christophherr.com
 * Description: Functions for functions.php
 * Version: 1.0
 * Author: Christoph Herr
 * Author URI: https://www.christophherr.com
 * License: GPL2
 */


// Function to remove the primary navigation from its original place 
add_action( 'get_header', 'ch_remove_nav');
function ch_remove_nav () {
remove_action( 'genesis_after_header', 'genesis_do_nav');
}

// Repositioning the primary navigation to a new place
add_action( 'genesis_before_header', 'genesis_do_nav');

I hope you find this useful.

Share this:

Share on X (Twitter)Share on FacebookShare on PinterestShare on LinkedInShare on Email

Filed Under: Code Snippets

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Getresponse Email Marketing WordPress Speed Test

Subscribe to my newsletter

Please enter your information here:

I hate spam. Your information is save.

Latest Posts

WordPress Black Friday & Cyber Monday Deals

Once again it´s time for WordPress Black Friday & Cyber Monday Deals. Like last year, I have … [Read More...] about WordPress Black Friday & Cyber Monday Deals

Cafe Pro - sticky menu and image logo - end result

Add a logo to the sticky menu of Cafe Pro

A member of the Studiopress forum asked how to show a logo in the after header menu (primary … [Read More...] about Add a logo to the sticky menu of Cafe Pro

Smart Passive Income Pro screenshot

Remove the featured image from the homepage of Smart Passive Income Pro

Studiopress just released a new child theme for the Genesis Framework, called Smart Passive Income … [Read More...] about Remove the featured image from the homepage of Smart Passive Income Pro

Footer

StudioPress Theme of the Month

Copyright © 2025 · Magazine Pro Theme On Genesis Framework · WordPress · Log in