Giter Site home page Giter Site logo

grayghostvisuals / wp-flex Goto Github PK

View Code? Open in Web Editor NEW
133.0 133.0 40.0 2.26 MB

A responsive, foundational WordPress theme boilerplate. Adheres to best practices and requirements set by the official WordPress Codex and theme review guidelines.

License: GNU General Public License v2.0

PHP 82.97% CSS 14.86% JavaScript 2.17%

wp-flex's People

Contributors

arthurvr avatar grayghostvisuals avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-flex's Issues

Header Image

New way to add custom header image and conditional check.

header.php

<?php $header = get_header_image(); ?>
<?php if ( $header ) : ?>
<div id="header-image">
    <a href="<?php echo home_url() ?>">
        <img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="">
    </a>
</div>
<?php endif; ?>

functions.php

$defaults = array(
            'default-image'          => '',
            'random-default'         => false,
            'width'                  => 0,
            'height'                 => 0,
            'flex-height'            => false,
            'flex-width'             => false,
            'default-text-color'     => '',
            'header-text'            => true,
            'uploads'                => true,
            'wp-head-callback'       => '',
            'admin-head-callback'    => '',
            'admin-preview-callback' => '',
        );
add_theme_support( 'custom-header', $defaults );

Multiple errors when activating theme. ("already defined" and "Cannot modify header information")

Hi,

Just trying out your boilerplate theme. However, upon setting the theme up and creating a child theme for it, I get the following errors.

Thanks!

Notice: Constant HEADER_TEXTCOLOR already defined in /my-site/wp-content/themes/WP-Flex-master/inc/functions/header.php on line 5

Notice: Constant HEADER_IMAGE already defined in /my-site/wp-content/themes/WP-Flex-master/inc/functions/header.php on line 6

Notice: Constant HEADER_IMAGE_WIDTH already defined in /my-site/wp-content/themes/WP-Flex-master/inc/functions/header.php on line 7

Notice: Constant HEADER_IMAGE_HEIGHT already defined in /my-site/wp-content/themes/WP-Flex-master/inc/functions/header.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at /my-site/wp-content/themes/WP-Flex-master/inc/functions/header.php:5) in /my-site/wp-includes/option.php on line 750

Warning: Cannot modify header information - headers already sent by (output started at /my-site/wp-content/themes/WP-Flex-master/inc/functions/header.php:5) in /my-site/wp-includes/option.php on line 751

Filter Title in Body ID

<body id="<?php echo strtolower(preg_replace('/\s+/', '-', get_the_title($ID))); ?>"></body>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.