This file contains hidden or 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 | |
| /** | |
| * @package WordPress | |
| * @subpackage Theme_Name | |
| * @since Theme Name 1.0 | |
| */ | |
| // replace "themename" with the theme slug | |
| // load javascript on initialization |
This file contains hidden or 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 | |
| /** | |
| * @package WordPress | |
| * @subpackage Theme_Name | |
| * @since Theme Name 1.0 | |
| */ | |
| // replace "themename" with the theme slug | |
| // load javascript on initialization |
This file contains hidden or 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
| /** | |
| * Remove empty paragraphs created by wpautop() | |
| * @author Ryan Hamilton | |
| * @link https://gist.github.com/Fantikerz/5557617 | |
| */ | |
| function remove_empty_p( $content ) { | |
| $content = force_balance_tags( $content ); | |
| $content = preg_replace( '#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content ); | |
| $content = preg_replace( '~\s?<p>(\s| )+</p>\s?~', '', $content ); | |
| return $content; |
This file contains hidden or 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 | |
| /** | |
| * Enqueue scripts and styles. | |
| */ | |
| function balihomes_scripts() { | |
| wp_enqueue_style( 'balihomes-fontawesomestyle', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'); | |
| wp_enqueue_style( 'balihomes-bootstrapstyle', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'); | |
| wp_enqueue_style( 'balihomes-style', get_stylesheet_uri() ); | |
| wp_enqueue_style( 'balihomes-stylemain', get_template_directory_uri() . '/css/style.css'); |
This file contains hidden or 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 | |
| /* | |
| * Template Name: Homepage | |
| */ | |
| get_header();?> | |
| <?php | |
| global $post; | |
| $args = array( 'posts_per_page' => 24, 'post_type'=> 'villa', 'orderby' => 'menu_order', 'order' => 'ASC' ); | |
| $myposts = get_posts( $args ); | |
| foreach( $myposts as $post ) : setup_postdata($post); |
This file contains hidden or 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 | |
| /** | |
| * Flatbase by NiceThemes. | |
| * | |
| * The Header for our theme. | |
| * | |
| * Displays all of the `<head>` section and everything up till `<div id="container">` | |
| * | |
| * @package Flatbase | |
| * @author NiceThemes <hello@nicethemes.com> |
This file contains hidden or 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 add_action('wp_head', 'add_google_analytics'); | |
| function add_google_analytics() { | |
| // Insert your GA code here | |
| } ?> |
This file contains hidden or 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 | |
| /* | |
| In your functions.php file on the child theme, enter the following code | |
| */ | |
| function prefix_theme_enqueue_styles() { | |
| $parent_style = 'parent-style'; // style.css of the parent theme | |
| wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); | |
| wp_enqueue_style( 'child-style', |