Author:
erics , February 19th, 2021
Create two template files in the wp-content/themes/{themeName}/ subdirectory:
page_blog . php
page_blog_plus_content . php
page_blog.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
< ? php
/*
WARNING: This file is part of the core Genesis framework. DO NOT edit
this file under any circumstances. Please do all modifications
in the form of a child theme.
*/
/**
* Template Name: Blog
* This file handles blog post listings within a page.
*
* This file is a core Genesis file and should not be edited.
*
* @category Genesis
* @package Templates
* @author StudioPress
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
* @link http://www.studiopress.com/themes/genesis
*/
genesis ( ) ;
page_blog_plus_content.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
< ? php
/*
WARNING: This file is part of the core Genesis framework. DO NOT edit
this file under any circumstances. Please do all modifications
in the form of a child theme.
*/
/**
* Template Name: Blog Plus Content
* This file handles blog post listings within a page.
*
* This file is a core Genesis file and should not be edited.
*
* @category Genesis
* @package Templates
* @author StudioPress
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
* @link http://www.studiopress.com/themes/genesis
*/
// to see the page title and page content, uncomment this:
add_action ( 'genesis_loop' , 'genesis_standard_loop' , 5 ) ;
genesis ( ) ;
Categories: How-To's , Technology Tags: Blog , Blog Paage , Categories , Category , genesis , howto , page_blog , query_args , tips , WordPress
| No comments
Author:
erics , August 6th, 2018
Create a new page and set the Page Template to Blog. Add a new Custom Field to the page. Set the Name to the string query_args and the value to cat=NNN&orderby=title&order=ASC, where NNN is the ID of the desired category. Ne sure to use the PLURAL form query_args NOT query_arg Be sure to click Publish […]
Categories: How-To's , Technology Tags: Blog , Cat , Categories , Category , Custom , Custom Field , Field , howto , query_arg , query_args , Single , tips
| No comments
Author:
erics , January 24th, 2016
add_action ( 'genesis_entry_content' , 'featured_post_image' , 8 ) ;
function featured_post_image ( ) {
$ categories = get_the_category ( ) ;
foreach ( $ categories as $ category ) {
// You can use slug, ID or any other identifier from the WP_Object
//if ($category->term_id == 288) {
if ( $ category -> slug == 'your-slug-here' ) {
print '<div id="sub-header-image">' ;
the_post_thumbnail ( 'post-image' ) ;
print '</div>' ;
}
}
return ;
}
Categories: How-To's , Technology Tags: Categories , Category , howto , POST , Single , Slug , tips , WordPress
| No comments