Skip Navigation

[Resolved] Taxonomy url: how to define lay-out

This support ticket is created 7 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 10 replies, has 2 voices.

Last updated by Bart Gybels 7 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#403080

I am trying to:

I have a view where a list off the custom taxonomy 'Event categories' is shown with url.
When I go to the url i always see my latest added post.

How can i show the correct post with that category?

I visited this URL: hidden link

I expected to see: At left side a view with all 'Event Categories' en right side all the posts with from the category 'in-house-event'

Instead, I got: Latest added post.

#403230

Dear Thomas,

I checked the URL, but can not find the "Latest added post", how do you setup it?
Is it a widget?

If it is, I suggest you try with widget of Views plugin, see our document:
https://toolset.com/documentation/user-guides/views/
Section "4. Displaying the View":
To display a View as a widget, go to Appearance->Widgets. Look for the WP Views widget and drag it to a widget area. Then, select the View to display.

#403254

Dear,

I don't think that I described my problem correct.

The url hidden link should by a list of all posts from the taxonomy 'in-house-event'.

I made an archive layout for the taxonomy of 'event-category'. This is shown on the page hidden link or hidden link

But when I go to hidden link it must shown only the posts of the taxonomy in-house-event and if I go to hidden link it should shown the posts of taxonomy 'congress'. How can i do that in a lay-out or view?

#403272

I assume the problem URL is archive page of term "in-house-event", you are going to display the posts which are assigned with term "in-house-event", this is built-in feature of WordPress, in your layout, you can add a "Wordpress Archive cell" to display the posts, see our document:
WordPress Archive Cell
https://toolset.com/documentation/user-guides/wordpress-archive-cell/

#403745

Dear,

Yeah that is the result that I want but is it possible with the same pagination of the views?
So Previous 1 2 3 ... 5 Next?

#404012

The pagination of Archives page is depends on your theme file. for example in wordpress default theme twentysixteen, file archive.php line 47~52:

// Previous/next page navigation.
the_posts_pagination( array(
				'prev_text'          => __( 'Previous page', 'twentysixteen' ),
				'next_text'          => __( 'Next page', 'twentysixteen' ),
				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
			) );

More help:
http://codex.wordpress.org/Function_Reference/the_posts_pagination

#404025

I use the toolset starter theme from wp-types but this theme doesn't have an archive.php file?
What do i need to do?

#404029

The toolset starter theme is using theme file "index.php" to render the wordpress archive page, I suggest you try this:
1) Create a theme file "archive.php" in your theme folder, copy/paste the PHP codes from index.php to archive.php.
2) Find the PHP codes 44~49:

			// Previous/next page navigation.
			the_posts_pagination( array(
				'prev_text'          => __( 'Previous page', 'twentysixteen' ),
				'next_text'          => __( 'Next page', 'twentysixteen' ),
				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
			) );

Modify it as what you want

#404034

But I use the WordPress Archive function of Toolset.

So in the loop info is this shown:

<!-- wpv-loop-end -->
[wpv-archive-pager-prev-page][wpml-string context="wpv-views"]Older posts[/wpml-string][/wpv-archive-pager-prev-page][wpv-archive-pager-next-page][wpml-string context="wpv-views"]Newer posts[/wpml-string][/wpv-archive-pager-next-page]

How can i change this so the the pagination becomes 'Older posts 1 2 3 ... 6 Newer Posts'?

#404057

There isn't such a feature within Views plugin, you can create a custom shortcode for it, for example:
1) add below codes into your theme/functions.php:

add_shortcode('my-archive-pagination', 'my_archive_pagination_func' );
function my_archive_pagination_func($atts){
	return get_the_posts_pagination( $atts );
}

2) use the shortcode, like this:

[my-archive-pagination mid_size="3"]
#404067

Thx.
That worked

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.