timm49
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Category Page for Custom Post Type?Try this,
go to settings –> permalinks. Check the bottom one from the list and put this in the field: /%category%/%postname%/
In the tutorial it said that now you have to refresh the https://www.mysite.com/phones – then AGAIN save the changes you made in the backend, and refresh again (very weird – got that from the Lynda.com tutorial)
Forum: Themes and Templates
In reply to: Category Page for Custom Post Type?Ok, I’m afraid the experts should take a look now ??
I also think the way it creates the URLs should be adjusted in the backend settings. But I don’t know exactly how from the top of my head.Forum: Themes and Templates
In reply to: Category Page for Custom Post Type?I don’t have any source codes here (sitting at work right now :))
But I remember, in the code where you create te CPT, there should be sth like “‘has_archive’ => true”
Forum: Themes and Templates
In reply to: Category Page for Custom Post Type?So far I’m only creating Child Themes, based on the standard twentyeleven. Whenever I create such a PHP file, I copy the archive.php file from this theme into my child theme folder, and adjust it. Renaming the file to “archive-YourTaxonomyName.php” it automatically only affects the posts that you assigned this taxonomy to.
So for the source code, just copy an original!
Forum: Themes and Templates
In reply to: Category Page for Custom Post Type?I’m new with WP, didn’t even finish my first site yet, so I may give wrong advice. But, doesn’t WP create a page automatically for a CPT? I’ve created a CPT called gigs, if I now go to https://www.mysite.com/gigs I see all the posts from this CPT.
I believe with creating a file called archive-TAXONOMYNAME.php you can customize the page which is listing this specific taxonomy term.
I may be wrong, so I’m curious what others say!
Forum: Themes and Templates
In reply to: Archive post type by dateCorrection – I think I was a bit unclear at the end.
Based on todays date, I’d like WordPress to see if it’s an upcoming gig, or if it’s a past gig. If it’s an upcoming gig – it should be under the UPCOMING GIGS header, otherwise under the right year.
I don’t think I can use the post date here, cos upcoming gigs won’t be displayed if I put in a “future” date, right?
Thanks again!