question about templates

Community Forums Forums General Discussion question about templates

This topic is: resolved

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  Kevin 1 year, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #62946

    Kevin
    Participant
    Post count: 75

    How 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 Genesis

    #62955

    Arya
    Participant
    Post count: 4

    Hi 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

    #62965

    Kevin
    Participant
    Post count: 75

    I 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?

    #62968

    Kevin
    Participant
    Post count: 75

    here’s a screenshot of what I think is the archive-c2assignments.php page (should read ‘page only’ not ‘oage only’
    Screenshot

    • This reply was modified 1 year, 2 months ago by  Kevin.
    • This reply was modified 1 year, 2 months ago by  Kevin.
    #62970

    Kevin
    Participant
    Post count: 75

    The single-c2assigments.php page is correct in its layout
    scrnst

    #63237

    Kevin
    Participant
    Post count: 75

    I 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?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.