So I have a page of posts and I would like to be able to filter the posts by month, category, and a keyword filter that a user enters. I have found some examples online of plugins that will accomplish the keyword and category and keyword fields, but I am not seeing an easy way to add the month selector. Would it be easier to make a custom filter form myself? The only issue I am seeing with that is the keyword filter.
Any pointers would be greatly appreciated.
I think the best solution is using AJAX. You can create inputs in template where all posts show then define logic and javasctipt files in functions.php and finally add js files.
Related
I am at a loss which method to use. I am simply trying to loop through all the admin pages in the backend of WP. From there I'll check if there's matching meta criteria and then return the results to a custom backend page. But I've searched and can't seem to find any sort of method or other to query it. Appreciate any pointers!
Following on from my comment,
Have you tried iterating through $GLOBALS['menu']
This is perhaps a very basic Wordpress development question. I am aware about creating custom types in Wordpress. So I created a Product type and a Version type and I would like to be able to keep a one-to-many relationship between the two i.e. for every Product, I would like to be able to associate one or more Version items from the admin editor. What is the way to do this? I am not in favor of using plugins, so I was thinking, I would use some kind of a custom field array of IDs, to connect the two. Am I on the right way? If I have to use a plugin, which one should it be?
The easy way to do this would be to add a meta box on your product admin page. That way you can create a drop down list on your product page with your versions. You can get more on adding meta boxes using add_meta_box here.
You add all required functions to your themes' functions.php, but to summarise you will need the following wp functions amongst others.
add_action
add_meta_box
update_post_meta
Looking up these functions in the Wordpress Codex (using google) will get you on your way. If you get stuck, post some code of what you have tried and take it from there. There are a number of tutorials/examples around. If you can do enough to create custom types this should not take you long.
I'm looking to add some content above the wp_list_table for a custom post type. I have custom bulk actions and filters but would like to add some further content to this header area. I cant seem to find a hook that will get me into the header. The only one I can seem to find is 'all_admin_notices' which is above the page title so not optimal.
Anywhere either below the title, below the post status buttons or even under the bulk action / filters will do.
Is this possible? If so what hook am I looking at?.
Image link below. Area highlighted in red is what I'm trying to achieve.
http://indi-media.com/stackoverflow/Example.jpg
Thanks Guys.
Turns out it probalby isnt possible without a hacky jquery approach or extending the wp table class which I'm not keen on doing. The only real way to do it is to construct the page and tables etc yourself.
Thanks for the pointers anyway guys.
My idea is to have a page where two authors can post multiple posts (in the page) and other visitors can comment the whole page:
I had in mind a very simple (hack) approach which is:
Having a custom "page" that has all the posts of a category and that page can be commented
Having a page where two people edit the content (but then the multiple posts are faked by being one page only being modified) and normal comments for the page
Use of taxonomies (which I am not very used to) and create a custom taxonomy where you can post and comment, any hint on this one?
Is there any better way of achieving this?
There's a great plugin for this: https://wordpress.org/plugins/pagely-multiedit/
If you don't want to use the plugin, you can carve out the functional code.
Let me know if you have any other questions/issues regarding this or if it doesn't fully solve your goal.
I want to create a custom post type in Wordpress for a course section on a site. I want to be able to add a course and then within that course add lessons. I know how to create basic custom posts but haven't been able to figure out a post within a post. Is this even possible?
The url structure would look something like this:
www.mysite.com/courses/awesome-course/lesson-1/
This is the sort of thing I'm looking for but want to build it myself: http://www.woothemes.com/products/sensei/
Any suggestions would be greatly appreciated,
Thanks
Install the Custom post types plugin by iLocalize http://wordpress.org/plugins/types/. They have a lot of tutorials on how to add the custom posts to a page. This tutorial http://youtu.be/1SXyHbgjYaI here is the best I've found but there are more the wp-types website.