Skip to content

Instantly share code, notes, and snippets.

View KnowTheCodePro's full-sized avatar

Know the Code Pro - Team Gist account KnowTheCodePro

View GitHub Profile
@KnowTheCodePro
KnowTheCodePro / home.php
Created April 28, 2016 14:36
Genesis Home Page that uses the Genesis > Theme Settings > Blog Page Template
<?php
/**
* Home page (posts page)
*
* @package Altitude
* @since 1.0.0
* @author hellofromTonya
* @link https://knowthecode.io
* @license GNU General Public License 2.0+
*/
@KnowTheCodePro
KnowTheCodePro / instructions.txt
Last active April 28, 2016 00:19
Genesis Read More Link - Change the HTML and Text
Here are the instructions for you:
1. Watch the video that walks you through this
2. Create a new folder in your theme's `lib` folder called `structure`.
3. Inside of `structure`, add the `post.php` file below. Just copy and paste it into that folder.
4. In your `functions.php file`, paste this line of code: `include( CHILD_DIR . '/lib/structure/post.php' );`, which loads up your new `post.php` file.
5. Now in your `style.css` file, you need to find the following:
a. find here the `button` style is and then add `.more-link,` above it. Watch the video to see where to do this.
b. find the `button:hover,` and then add this above it: `.more-link:hover,`.
<?php
namespace KnowTheCode;
function get_post_name( array $post ) {
return $post['post_name'];
}
$post = array(
'post_name' => 'PHP is_array - When',
);
@KnowTheCodePro
KnowTheCodePro / end-in-action.php
Created March 1, 2016 01:25
PHP end - In Action
<?php
namespace KnowTheCode;
$members = array(
array(
'first_name' => 'Tonya',
'Twitter' => 'hellofromTonya',
'email' => 'hellofromtonya@knowthecode.io',
),
array(
@KnowTheCodePro
KnowTheCodePro / deep-into-structure.php
Created February 16, 2016 19:25
PHP Array - Deep into Structure
<?php
namespace KnowTheCode;
$fruit = array(
'apples',
'oranges',
'pears',
);
$members = array(
@KnowTheCodePro
KnowTheCodePro / visualizingarray.php
Created February 16, 2016 19:24
PHP Array - Visualizing the Array
<?php
namespace KnowTheCode;
$main_st_homes = array(
1058 => array(
'floor1' => array(
100 => array(
'name' => 'Smith',
),