• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Trouble with a single-xx.php template in Outreach

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Trouble with a single-xx.php template in Outreach

This topic is: not resolved
  • This topic has 4 replies, 2 voices, and was last updated 7 years, 11 months ago by NWTD.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 18, 2015 at 2:10 pm #141237
    NWTD
    Member

    I'm using a plugin by WPMU Dev, CoursePress, that utilizes custom post types for the different elements. I'm having trouble when creating a custom single page template.

    Without a custom single page template, most of the elements are shown on the page in question -- without proper formatting and extra information that doesn't need to be there (screenshot: http://imgur.com/ByXCOct). However, as soon as I create a custom single page template with the basics:

    <?php
    
    genesis();

    things stop working as they should (screenshot: http://imgur.com/0NzrMPb).

    First the title of the page is changed to "Blog" -- even when adding something like:

    remove_action( 'genesis_title', 'genesis_do_title' );
    add_action( 'genesis_title', 'pactems_course_discussion_title' );
    function pactems_course_discussion_title() {
    
    	global $coursepress;
    	$course_id = do_shortcode('[get_parent_course_id]');
    	
    	echo '<title>';
    	echo get_the_title($course_id);
    	echo ' Discussions | PACT EMS</title>';
    
    }

    it doesn't do anything.

    Second, the query for this taxonomy breaks and shows the contents for all of the items in that taxonomy.

    Here is my custom page template: http://pastebin.com/CALHja67 and here's the default single-unit.php that is not genesis based that I'm modeling after: http://pastebin.com/VnyWVgcq

    Unfortunately I can't link to the page in question as it requires credentials and enrollment. I can provide more screenshots if that's helpful.

    Anything that can help me sort out whats going on would be greatly appreciated. Thanks!

    February 20, 2015 at 11:46 am #141490
    Brad Dalton
    Participant

    Try this remove_action( 'genesis_entry_header', 'genesis_do_post_title' );


    Get Help – Book Consultation.

    February 20, 2015 at 11:52 am #141492
    NWTD
    Member

    That's for the post's title. I'm talking about the title of the page located in the <head> section of the HTML markup. Sorry for the confusion.

    February 20, 2015 at 12:00 pm #141494
    Brad Dalton
    Participant

    So its an archive page? Or single page template title?

    Also, Don't use echo do_shortcode https://kovshenin.com/2013/dont-do_shortcode/


    Get Help – Book Consultation.

    February 20, 2015 at 12:25 pm #141509
    NWTD
    Member

    Single page template.

    Understood on the echo do_shortcode -- I'm literally copy/pasta from the plugin's own template to make it work within genesis.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble