<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Custom post type single post/page title &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/feed/</link>
		<description></description>
		<lastBuildDate>Sun, 23 Nov 2025 14:33:45 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35114</guid>
					<title><![CDATA[Custom post type single post/page title]]></title>
					<link>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35114</link>
					<pubDate>Sat, 19 Apr 2014 16:36:58 +0000</pubDate>
					<dc:creator>Jack S</dc:creator>

					<description>
						<![CDATA[
						<p>Hello,</p>
<p>I&#8217;m building a site with a custom post type, and have hooked in the template file for the single post as follows:</p>
<pre><code>function get_custom_post_type_template($single_template) {
	global $post;
	if ($post-&gt;post_type == &#039;event&#039;) {
		$single_template = dirname(__FILE__).&#039;/single-event.php&#039;;
	}
	return $single_template;
}
add_filter(&#039;single_template&#039;,&#039;get_custom_post_type_template&#039;);</code></pre>
<p>This is because I do not wish to modify the x theme directory at all, including adding files.</p>
<p>The issue I&#8217;m having is that there I have no control over the page title for single-event.php as it is already set by the theme previously via get_header(). There is a title there but it&#8217;s whatever&#8217;s defined in the theme options for the title of the blog page, rather than the current post title (like the_title()), which is what I need.</p>
<p>For clarification: this is what I need to change:</p>
<pre><code>&lt;header class=&quot;x-header-landmark&quot;&gt;
      &lt;div class=&quot;x-container-fluid max width&quot;&gt;
        &lt;div class=&quot;x-landmark-breadcrumbs-wrap&quot;&gt;
          &lt;div class=&quot;x-landmark&quot;&gt;       
              &lt;h1 class=&quot;h-landmark&quot;&gt;&lt;span&gt;Blog Title&lt;/span&gt;&lt;/h1&gt;      
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/header&gt;</code></pre>
<p>What would be the best way to fix this?</p>
<p>Thank you,<br />
J</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35254</guid>
					<title><![CDATA[Reply To: Custom post type single post/page title]]></title>
					<link>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35254</link>
					<pubDate>Sun, 20 Apr 2014 02:42:26 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Jack,</p>
<p>Thank you for posting in! You could create another header on your child theme.<br />
The best way is copying some x theme files.</p>
<p>For example.</p>
<p>1. Copy x theme&#8217;s header.php and rename it into <strong>header-event.php</strong>, and place it in your child theme.</p>
<p>Then you can just call it like :</p>
<p><code>get_header(&#039;event&#039;);</code></p>
<p>2. In your header-event.php code, you should change it into :</p>
<p><code>&lt;?php x_get_view( x_get_stack(), &#039;wp&#039;, &#039;header-event&#039; ); ?&gt;</code></p>
<p>3. Then copy your <strong>/x/framework/views/{STACK}/wp-header.php</strong> into <strong>/x-child-{STACK}/framework/views/{STACK}/wp-header-event.php</strong></p>
<p>4. Edit your wp-header-event.php and find something like :<br />
 <code>&lt;?php x_get_view( &#039;{STACK}&#039;, &#039;_landmark-header&#039; ); ?&gt;</code><br />
  and edit it into :<br />
 <code>&lt;?php x_get_view( &#039;{STACK}&#039;, &#039;_landmark-header-event&#039; ); ?&gt;</code></p>
<p>5. Copy your <strong>/x/framework/views/{STACK}/_landmark-header.php</strong> into <strong>/x-child-{STACK}/framework/views/{STACK}/_landmark-header-event.php</strong></p>
<p>6. Then edit your new <strong>_landmark-header-event.php</strong> 🙂</p>
<p>Hope this helps.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35333</guid>
					<title><![CDATA[Reply To: Custom post type single post/page title]]></title>
					<link>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35333</link>
					<pubDate>Sun, 20 Apr 2014 16:51:23 +0000</pubDate>
					<dc:creator>Jack S</dc:creator>

					<description>
						<![CDATA[
						<p>Hello,</p>
<p>Thanks for your reply. Unfortunately, I&#8217;m not using a child theme (I haven&#8217;t ever) &#8211; I am just using X, and I have my custom post type &amp; the templates in a plugin. I&#8217;m going to try the instructions you&#8217;ve provided however, only with the plugin rather than a child theme. My only concern is that I want to be able to update the X theme version in the future &#8211; will that be a problem if I copy and paste the code from header.php? Would I have to update the custom header file every time I update the theme?</p>
<p>Thanks,<br />
Jack</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35493</guid>
					<title><![CDATA[Reply To: Custom post type single post/page title]]></title>
					<link>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-35493</link>
					<pubDate>Mon, 21 Apr 2014 06:12:14 +0000</pubDate>
					<dc:creator>Support</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>Thank you for the update.</p>
<p>I&#8217;m sorry but you can&#8217;t preserve this modification without using a child theme. You can edit the title for the custom post type on framework &gt; views &gt; {stack} &gt; _landmark-header.php. Find this code on line 34:</p>
<pre><code>&lt;?php if ( is_singular( &#039;x-portfolio&#039; ) ) : ?&gt;

              &lt;h1 class=&quot;h-landmark&quot;&gt;&lt;span&gt;&lt;?php echo get_theme_mod( &#039;x_portfolio_title&#039; ); ?&gt;&lt;/span&gt;&lt;/h1&gt;

            &lt;?php else : ?&gt;

              &lt;h1 class=&quot;h-landmark&quot;&gt;&lt;span&gt;&lt;?php echo get_theme_mod( &#039;x_renew_blog_title&#039; ); ?&gt;&lt;/span&gt;&lt;/h1&gt;

            &lt;?php endif; ?&gt;
</code></pre>
<p>Replace it with this:</p>
<pre><code> &lt;?php if ( is_singular( &#039;x-portfolio&#039; ) ) : ?&gt;

              &lt;h1 class=&quot;h-landmark&quot;&gt;&lt;span&gt;&lt;?php echo get_theme_mod( &#039;x_portfolio_title&#039; ); ?&gt;&lt;/span&gt;&lt;/h1&gt;

            &lt;?php elseif ( is_singular( &#039;event&#039; ) ) : ?&gt;
            
              &lt;h1 class=&quot;h-landmark&quot;&gt;&lt;span&gt;&lt;?php $title = get_the_title(); echo $title; ?&gt;&lt;/span&gt;&lt;/h1&gt;
              
             &lt;?php else : ?&gt;

              &lt;h1 class=&quot;h-landmark&quot;&gt;&lt;span&gt;&lt;?php echo get_theme_mod( &#039;x_renew_blog_title&#039; ); ?&gt;&lt;/span&gt;&lt;/h1&gt;</code></pre>
<p>I hope that helps.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-880586</guid>
					<title><![CDATA[Reply To: Custom post type single post/page title]]></title>
					<link>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-880586</link>
					<pubDate>Wed, 13 Apr 2016 18:34:38 +0000</pubDate>
					<dc:creator>awschro</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-881379</guid>
					<title><![CDATA[Reply To: Custom post type single post/page title]]></title>
					<link>https://theme.co/archive/forums/topic/custom-post-type-single-postpage-title/#post-881379</link>
					<pubDate>Thu, 14 Apr 2016 04:09:48 +0000</pubDate>
					<dc:creator>Rupok</dc:creator>

					<description>
						<![CDATA[
						<p>Hi <a href="https://theme.co/archive/users/awschro/" class="bbp-user-mention bbp-user-id-45095"> @awschro</a></p>
<p>Thanks for updating the thread. It&#8217;s a pretty old thread so it would be better if you open a new thread and provide your information there in a separate private reply. It will help to keep to forum clean, updated and useful for others. </p>
<p>Cheers!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

