Add term to custom post type on draft
Add term to custom post type on draft
Add term to custom post type on draft
Pagination with custom query, custom search form, single and pages, ajax and no plugins
Well let me answer my own question, this may not be perfect, but it works First I query the posts using WP_query normally, and then I build an associative array by myself including 2 values, one is post ID another one is the order(I merge 2 order fields into one here) then I use “uasort” … Read more
Custom Post Fields at the beginning of a Custom Permalink
Was wordpress able to create it’s .htaccess file? If not, copy the contents of the example from below the permalink options to your .htaccess in the root of your ftp.
How to organize hierarchical structure in custom post type with taxonomy (like with categories)
“advice on the best approach” questions do not make for very good questions here as they tend to be pretty broad and subject to opinion, but I’ll give you some options and hope for the best. Option 1: You should be able to use ordinary pages for this. Create templates for your custom content just … Read more
So after reading through the codex, I came across the pre_get_posts hook, and I decided to try changing the query with it, which worked for me. Not sure if it is the best way though. For anyone that is interested here is what I did: add_action(‘pre_get_posts’, ‘get_grandchildren’ ); function get_grandchildren() { if ( isset( $_GET[‘child_of’] … Read more
Migrating a taxonomy’s tags to the native category
If I understand correctly you have something like so: Category A (Using Template 1) Sub-Category 1 (Using Template 2) Sub-Category 2 (Using Template 2) Category B (Using Template 1) You might need to add this to your archive-products.php as a conditional to test if a category has children, and if so show a different layout … Read more