Skip Navigation

[Resolved] Page with user articles and search form

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to create a View of the current User's posts.

Solution:
Add a Query Filter to this View and filter by Post Author.

Relevant Documentation:
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/

This support ticket is created 6 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 3 voices.

Last updated by Christian Cox 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#630122

I want to create a page that has:

the top part shows the articles that a user has written.

the part under a search form. (I have already created the search form with view)

obviously the user sees his articles if he logs in, otherwise he only sees the search form

how can I do ?

#630209

The very easiest is to use 2 Views.

One View will query and display posts that are authored by the current logged in user.
The other View displays whatever Custom Search and results you chose.

Then, in a page, you insert the first View wrapped in an Access ShortCode, so that the View is visible only to logged in users.
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/

The second View with the Custom search is inserted just below it, without any condition.

This will show both lists to logged in users and only the search if the user is logged out.

#631438

Sorry, Beda, I saw a guide, but I can not find her anymore. "how to create a view of user posts"

#631519

I am sorry, I do not understand.

What is it that you need?

I cannot find any guide to that Title, we have none.
Maybe you refer to some training site?

#631525

I need to create a view with the posts of the registered user

#631559

Hi, if you need to create a View showing only the posts of the current User, you should edit the View and add a Query Filter that filters by Post Author, where the Post Author is the current logged-in User. If you cannot see the Query Filter editor in the View editor screen, go up to the top and click the "Screen Options" tab and activate the Query Filter panel. Here's the documentation we have about this: https://toolset.com/documentation/user-guides/filtering-views-query-by-author/

#631932
esempio10.png

perfect very well. you can see the result here: hidden link

I had forgotten to write something in the post.
in the view I created I see my 3 posts, if you click on the name takes you to the layout.
I would like to see in the Vista as I see in the layout. see example image

#632032

Okay it looks like you have created the design in Layouts and you would like to use the same design in Views. So I would copy the shortcodes and HTML markup from your Layout. If the View loop uses a loop template, paste the code into the loop template. Otherwise, paste the code in each item of the loop. The Layout is much larger than the View, so it will probably require some CSS changes to make everything fit in a smaller size.