This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Register custom post types on the 'init' hook. */ | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 0.1.0 | |
* @access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register services custom post type | |
function service_post_type() { | |
$labels = array( | |
'name' => _x( 'Services', 'post type general name', 'your-plugin-textdomain' ), | |
'singular_name' => _x( 'Service', 'post type singular name', 'your-plugin-textdomain' ), | |
'menu_name' => _x( 'Services', 'admin menu', 'your-plugin-textdomain' ), | |
'name_admin_bar' => _x( 'Service', 'add new on admin bar', 'your-plugin-textdomain' ), | |
'add_new' => _x( 'Add New', 'Service', 'your-plugin-textdomain' ), | |
'add_new_item' => __( 'Add New Service', 'your-plugin-textdomain' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Querying by Post Type --> | |
<section id="slider"> | |
<?php | |
query_posts(array( | |
'post_type' => 'slider', | |
'post_per_page' => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- call header --> | |
<?php get_header();?> | |
<!-- Blog title Section --> | |
<section id="heading"> | |
<div class="overlay"> | |
<div class="container"> | |
<h1 class="title">Blog</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Register right sidebar | |
function footer_widget(){ | |
register_sidebar(array( | |
'name'=>'Footer Sidebar', | |
'id'=>'footer_widget', | |
'description'=>'This is our footer widget', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register a meta box under the services section | |
function service_meta_box() { | |
add_meta_box( | |
'service_icon',//id | |
'Service Metabox',//title | |
'service_icon_callback',//callback | |
'service',//screen | |
'side',//context | |
'high'//priority |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WP setting API (use for all section heading and short desription) | |
function wp_option_field(){ | |
//add_settings_field( $id, $title, $callback, $page, $section = 'default', $args = array() ) | |
add_settings_field( 'service_title', 'Service Title', 'service_title_callback' , 'general' ); | |
add_settings_field( 'service_des', 'Service Descriptin', 'service_des_callback' , 'general' ); | |
add_settings_field( 'our_team_title', 'Team Title', 'our_team_title_callback' , 'general' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WP widget API (collected from codex documentation) | |
<?php | |
/** | |
* Adds Foo_Widget widget. | |
*/ | |
class Foo_Widget extends WP_Widget { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dynamic search bar (searchform.php). | |
<!-- Search Bar --> | |
<div class="widget blog-search-bar"> | |
<h4 class="title">Search</h4> | |
<form class="form-search" method="get" id="s" action="<?php bloginfo('url'); ?>/"> | |
<div class="input-append"> | |
<input class="form-control input-medium search-query" type="text" name="s" value="<?php the_search_query(); ?>" placeholder="Search" required> | |
<button class="add-on" type="submit"><i class="fa fa-search"></i></button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -404 Page CSS | |
-------------------------------------------------------------------------*/ | |
.wrap { | |
font-family: 'Open Sans', sans-serif; | |
-webkit-background-size:cover; | |
-moz-background-size:cover; | |
background-size:cover; | |
background-attachment: fixed; | |
height: 100%; | |
display: flex; |
OlderNewer