c.note
Forum Replies Created
-
Forum: Plugins
In reply to: [Global Post Password] Global Pasword Protect my footer on protected pagesSimple solution, I’m just going to use the ID of page I know will always exists and be password protected also using get_the_password_form where required.
Forum: Fixing WordPress
In reply to: Sort post by custom date then post_date if no custom date existsFigure it our by using the posts_orderby filter
Forum: Plugins
In reply to: [Add Logo to Admin] [Plugin: Add Logo to Admin] Horror resultsYeah I get that too, I downgraded to an older version I had installed in a project from a number of months ago. Clearly the CSS for the login page logo is all wrong.
Forum: Plugins
In reply to: [More Fields] [Plugin: More Fields] Date field default to today's dateFor now I’ve just added a bit of jQuery using the admin_footer hook seems to do the job. It would be cool if this was made a setting, in the way you can add list items for a more fields list type it would be good to have an option to default the date to the current date or not if the date wasn’t meant to be mandatory.
Forum: Fixing WordPress
In reply to: Meta_query and doing a SUBSTR compare on a custom date fieldI got it thanks, it just didn’t register in my brain first time around. vtxyzzy, very much appreciated!!
Forum: Fixing WordPress
In reply to: Meta_query and doing a SUBSTR compare on a custom date fieldI’m basically trying to figure out if its possible to do it like this:
$args = array( 'meta_query' => array( array( 'key' => 'event-date', 'value' => '2012-02', 'compare' => '>=', 'type' => 'DATETIME' ) ), 'meta_key' => 'event-date', 'orderby' => 'meta_value', 'post_type' => 'events', 'posts_per_page' => 20, 'order' => 'ASC' );
Of course this bit wont work as effectively I’m comparing a string not a date:
array( 'key' => 'event-date', 'value' => '2012-02', 'compare' => '>=', 'type' => 'DATETIME' )
I was wondering if the options for compare include something which will allow me to perform an action that works the same way as the SUBSTR method. I looked at the docs and as far as I can tell its doesnt support CONTAINS as that would work in the same way.
Forum: Fixing WordPress
In reply to: Meta_query and doing a SUBSTR compare on a custom date fieldI have a page called whats-on and it has optional additional paratemers like this:
(A custom post type called events has been created)1. /whats-on/2012/02/03/event-name This scenriao I will grab a custom posty type item data based on the event name slug
2. /whats-on/2012/02/03 All custom post type events are selected that match that day YYYY-mm-dd
3. /whats-on/2012/02 All custom post type events are selected that match that month YYYY-mm
4. /whats-on/2012 All custom post type events are selected that match that year YYYYThis pretty much exactly waht I am in the procss of doing, I know the SQL to create but ideally I’d prefer to use get_posts or WP_Query
Forum: Fixing WordPress
In reply to: Meta_query and doing a SUBSTR compare on a custom date fieldThere is a condition to select one of the three. Thanks for the input.
chadrew you are correct I’ve gotten confused about what I was trying to achieve, I’ve revisited the project and what I did. I had a workaround but I wanted a clean way to do the following:
Hide the posts ie. permalinks don’t exist they go to 404 but the posts still appear in the search.The reasons for this is that this particular custom post type posts appear as a listing on an overview page therefore any search result for that post type the link goes to the overview page (I customise the results page to achieve this) and not the post permalink.
Basically I wanted to achieve this without having to put a redirect on the single-mycustomposttype.php page that redirects to the overview page.
I was actually referring to the internal search
What I wanted to do was create a custom post type in the normal way but exclude it from the internal search. If I changed the setting so it didn’t appear in the internal search then linking to the post gave me a 404.
Is this possible and if so how? Please advise – thanksThe script has been updated by the author, Chris Scott.
Forum: Plugins
In reply to: [Admin Menu Editor] [Plugin: Admin Menu Editor] It's fairly randomI posted something along the same lines just a few hours earlier:
I was thinking to upgrade to the Pro version but this issue puts me right off. I don’t think the settings are stored in a permanent way at all.
Does anyone know if the plugin uses cookies? That may account for the loss of the settings.
Forum: Plugins
In reply to: [More Fields] [Plugin: More Fields] Date fieldupdate on this, with 3.2.1 its causes an issue which means the admin widget drag and drop doesnt work so ive stopped using it and just going with the default date field.
it still really needs a proper date picker though
Forum: Plugins
In reply to: Remove feed_base from feed urlbeen trying to figure out to do this.
also, when using a prefix to the feed for a post in safari if you leave out feed in the url it stays at that url but using firefox it appears to redirect to the url with feed in it. eg.
https://domain.com/post-1/rss redirects to https://domain.com/post-1/feed/rssmust be some way to rectify this and remove the feed part. rss must be reserved as if you create a page called rss using permalinks it appears as rss-2.
its all a bit confusing…i just want rid of the feed bit in the url
WordPress 3.0.1