jonathanjfshaw
Forum Replies Created
-
Forum: Plugins
In reply to: [Mailchimp List Subscribe Form] Datepicker collision with ACFBetter solution:
//override silly mailchimp plugin css in admin backend function show_datepicker_year() { echo '<style type="text/css"> .ui-datepicker-year {display: inline !important;} </style>'; } add_action('admin_head', 'show_datepicker_year');Forum: Hacks
In reply to: custom post type 404s even after resetting permalinksI tried with % signs but made no difference.
Adding add_rewrite_tag as suggested by Milo:
http://wordpress.stackexchange.com/questions/83531/custom-post-type-404s-with-rewriting-even-after-resetting-permalinksfixed it nicely.
Forum: Hacks
In reply to: custom post type 404s even after resetting permalinksHaving in my custom post type
'rewrite' => array( 'slug' => 'event/xxx'),
and in my post_type_link filter
$output = str_replace('xxx', 'yyy', $post_link);Still leaves the same results, even after resaving permalinks:
the URLs list fine but return 404s.
e.g. mydomain.co.uk/betasitewpinstall/event/yyy/introduction-to-vision-quest-3/ returns 404I’m getting the idea that maybe I need to add add_rewrite_rule as well
Forum: Hacks
In reply to: custom post type 404s even after resetting permalinksHmm. I assumed that add_filter(‘post_type_link … was clever enough to tweak the request parser as well.
The people in these discussions:
//http://xplus3.net/2010/05/20/wp3-custom-post-type-permalinks/
//http://wordpress.stackexchange.com/questions/36017/custom-slug-for-custom-post-typeSeems to be doing this fine without getting the 404s I’m hitting.
I don’t think I need them year&month as URL parameters because I don’t want to do any data manipulation or lookup with them particularly.
It’s just that at the moment I have say three events (posts in my custom post type) called say “Fishing trip”. These get assigned permalinks by default like
mysite.com/events/fishing-trip
mysite.com/events/fishing-trip-2
mysite.com/events/fishing-trip-3
Which is boring and inelegant.I want instead
mysite.com/events/2013/january/fishing-trip
mysite.com/events/2013/may/fishing-trip
mysite.com/events/2014/march/fishing-trip
Prettier and more informative.But I’m just using the year&month to build a more unique URL name for the post, I’m not interested in doing anything more with them. No template or function of mine needs to read the URL to know the year and month of the current post. If they need to know this I just query the start_date custom field of the post.
I’m not interested in having category-style pages like
mysite.com/events/2013.
The year&month is just cosmetic in the URL.Anyway, if my use is simple like this, where to go next?
If I need to hack the request parser as well, can you point me in the direction of the function name / doc / example I need.
It’s weird that the other discussion I link to above, which seem to be trying to do exactly the kind of thing I am, don’t talk about this.Thanks for taking an interest!
JonathanForum: Plugins
In reply to: [Mailchimp List Subscribe Form] Datepicker collision with ACFSteps to replicate:
1) create custom post type (probably not necessary, try with ordinary post first)
2) create ACF field set including a datepicker field
3) attach field set to (custom) posts
4) try to change date in datepicker field
5) observe absence of year select boxThanks for your reply!
Jonathan