Community Forums › Forums › Archived Forums › General Discussion › question about templates
Tagged: templates
- This topic has 5 replies, 2 voices, and was last updated 12 years, 11 months ago by
Kevin.
-
AuthorPosts
-
September 16, 2013 at 11:06 pm #62946
Kevin
MemberHow do I create them?? I am going nuts trying to figure this out and I think I'm making it more complicated. I created an archive template for a custom post type (archive-mycpt.php) but the does not show at all. I know Genesis 2.0 has the archive setting when you use
'has_archive' => true,but I want to customize the page more. I want just post title that when clicked will open in the single-mycpt.php page. However this is not happening. How do I use the archive-mycpt.php page with the CPT I created? How do I display the post titles so that they are visible and the correct archive template is used?
I know how this is done in the WordPress default theme but can't figure out how to do this in GenesisSeptember 17, 2013 at 3:12 am #62955Arya
MemberHi Kevin,
Try to follow this tutorial http://www.carriedils.com/genesis-2-0-archive-settings-custom-post-types/
And then re-save your permalink settings.Hope that help.
Cheers,
-AP
You can find me @arya_prakasa
September 17, 2013 at 6:39 am #62965Kevin
MemberI created an archive template called archive-c1assigments.php and when I go to change the layout to full width - it does not change. Is this the best way to have the most flexibility of customizing the layout?
September 17, 2013 at 7:17 am #62968Kevin
Memberhere's a screenshot of what I think is the archive-c2assignments.php page (should read 'page only' not 'oage only'
September 17, 2013 at 7:22 am #62970Kevin
MemberThe single-c2assigments.php page is correct in its layout
September 18, 2013 at 12:03 pm #63237Kevin
MemberI have done something wrong. The classes/ Ids that I assigned to show the custom filed in my functions.php are showing on every page. I created these:
`// this adds the key values for each subject
add_action('genesis_post_content', 'ela');
function ela() {
if ( is_single() && genesis_get_custom_field('ela') )
echo '<h2>English Language Arts</h2>';
echo '<div id="homework-content">'. genesis_get_custom_field('ela') .'</div>';
}
add_action('genesis_post_content', 'math');
function math() {
if ( is_single() && genesis_get_custom_field('math') )
echo '<h2>Math</h2>';
echo '<div id="homework-content">'. genesis_get_custom_field('math') .'</div>';
}
add_action('genesis_post_content', 'science');
function science() {
if ( is_single() && genesis_get_custom_field('science') )
echo '<h2>Science</h2>';
echo '<div id="homework-content">'. genesis_get_custom_field('science') .'</div>';
}
add_action('genesis_post_content', 'social_studies');
function social_studies() {
if ( is_single() && genesis_get_custom_field('social_studies') )
echo '<h2>Social Studies</h2>';
echo '<div id="homework-content">'. genesis_get_custom_field('social_studies') .'</div>';
}'
to echo the custom fields to show the assignments. Is there a way to show them on a custom template? -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.