Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tagged blog posts don't show up on tag archive page #93

Closed
frnsys opened this issue Oct 4, 2017 · 3 comments
Closed

Tagged blog posts don't show up on tag archive page #93

frnsys opened this issue Oct 4, 2017 · 3 comments
Assignees

Comments

@frnsys
Copy link
Member

frnsys commented Oct 4, 2017

One last tag-related issue:

I tagged two blog posts as "audio", but they don't show up on the "audio" tag page:

https://thenewinquiry.com/tag/audio/

These are the two posts:

https://thenewinquiry.com/blog/break-it-down/
https://thenewinquiry.com/blog/when-game-of-thrones-stopped-being-necessary/

I'm guessing it's because by default these archive pages don't grab from the blogs post type?

@misfist
Copy link
Collaborator

misfist commented Oct 4, 2017 via email

misfist added a commit that referenced this issue Oct 4, 2017
#93 Added blogs post type to tag archive in `pre_get_posts` action @link #93
misfist added a commit that referenced this issue Oct 4, 2017
#93 Added blogs post type to tag archive in `pre_get_posts` action @link #93
@misfist
Copy link
Collaborator

misfist commented Oct 4, 2017

I added blogs to the tag archive and opened a PR #94.

It doesn't look like tags appear on single posts or blogs, so there isn't a link to the archive. It's only set up to show the category (if one exists) if that option is selected in the customizer.

e.g. http://tni-staging.positiondevapp.com/tag/a-film-called/

A function exists in the parent theme (gridbox/inc/template-tags.php), which can be used as is (or overwritten by redeclaring it in our tni theme) in order to display tags.

	function gridbox_entry_tags() {

		// Get tags.
		$tag_list = get_the_tag_list( '', '' );

		// Display tags.
		if ( $tag_list ) : ?>

			<div class="entry-tags clearfix">
				<span class="meta-tags">
					<?php echo $tag_list; ?>
				</span>
			</div><!-- .entry-tags -->

		<?php
		endif;
	}

It would be used similarly to the gridbox_meta_category() function (see: https://github.com/thenewinquiry/tni-theme/blob/master/template-parts/content-single.php#L18-L22)

@frnsys
Copy link
Member Author

frnsys commented Oct 5, 2017

Ok great thank you! -- we don't need to show tags in the posts themselves, we're just using them to organize audio posts.

frnsys added a commit that referenced this issue Oct 5, 2017
#93 Added blogs post type to tag archive
@frnsys frnsys closed this as completed Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants