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

Include archive URLs in found select options. #25

Open
sebask opened this issue May 24, 2017 · 7 comments
Open

Include archive URLs in found select options. #25

sebask opened this issue May 24, 2017 · 7 comments

Comments

@sebask
Copy link

sebask commented May 24, 2017

Currently it's not possible to select "pages" like an post archive page. Any way to accomplish this?

@jtsternberg
Copy link
Member

Sure it is, use the 'post_type' field parameter like in the example in the readme, but replace 'post' with 'page'.

@sebask
Copy link
Author

sebask commented May 24, 2017

Sorry for not describing this more clearly in my initial post. I meant an archive page as in the "system" archive page for i.e.: posts (archive.php), or CPT (archive-{post_type}.php).

I guess the problem is these are not really registered with an post id.

@tw2113
Copy link

tw2113 commented May 24, 2017

If I'm following correctly, those would just be the template files chosen to display the results of the query made for that archive. Not quite sure how they'd tie into this search field extension in this case.

@clovepod
Copy link

The creative solution we've come up with to this issue is to create link format pages that are basically a redirect over to the archive page URL. We can then select the link page and it acts like a pointer over to the CPT archive page.

@tw2113
Copy link

tw2113 commented May 24, 2017

Ahhh, @clovepod clued me in on what @sebask was looking for. They wanted to be able to select archive URL from the dropdown.

@tw2113 tw2113 changed the title Select i.e. archive pages Include archive URLs in found select options. May 24, 2017
@sebask
Copy link
Author

sebask commented May 26, 2017

Indeed, we often use those pages to display all post in our custom post types. Btw, Wordpress does show these archive pages in the Menu selector (see screenshot). Maybe that could be useful.
screen shot 2017-05-26 at 13 09 11

@clovepod Thanks! Sounds like a great quick fix.

@tw2113
Copy link

tw2113 commented May 26, 2017

The biggest hickup I could potentially see is that the field returns IDs, not archive urls. May get a bit hairy trying to juggle between the display types and also saving of the intended option between the two possible values.

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

4 participants