10sexyapples
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: wp_deregister_script mysteryHi KatieBen, I think what you need to do if you’re deregistering those is put your de-registration in a conditional like this:
if ( !is_admin() ) { wp_deregister_script( 'jquery' ); }
Hope that helps if you haven’t already figured that out ??
Forum: Fixing WordPress
In reply to: User does not appear in post_author_override drop down listI have this same issue, even after upgrading all code and functions to what is expected for roles and capabilities in 3.1. I’m thinking this must be a bug related to the issues in Ticket #14122. Have anyone found any resolution?
Forum: Fixing WordPress
In reply to: Adding Custum Post Type Thumbnail to the Edit Screen.No problem, I’m glad you’ve got it working ??
Forum: Fixing WordPress
In reply to: Adding Custum Post Type Thumbnail to the Edit Screen.Hi there …
change this –
// for post and page add_theme_support('post-thumbnails', array( 'post', 'page' ) );
to this –
// for post and page and banners add_theme_support('post-thumbnails', array( 'post', 'page', 'banners' ) );
Of course, make sure banners and not banner is your actual registered post type name.
And then, from what I can see here regarding the necessary associated hooks and filters …
I believe you can just change this –
// for posts add_filter( 'manage_posts_columns', 'fb_AddThumbColumn' ); add_action( 'manage_posts_custom_column', 'fb_AddThumbValue', 10, 2 ); // for pages add_filter( 'manage_pages_columns', 'fb_AddThumbColumn' ); add_action( 'manage_pages_custom_column', 'fb_AddThumbValue', 10, 2 );
to this –
// for posts
add_filter( 'manage_posts_columns', 'fb_AddThumbColumn' ); add_action( 'manage_posts_custom_column', 'fb_AddThumbValue', 10, 2 ); // for pages add_filter( 'manage_pages_columns', 'fb_AddThumbColumn' ); add_action( 'manage_pages_custom_column', 'fb_AddThumbValue', 10, 2 ); // for banners add_filter( 'manage_banners_posts_columns', 'fb_AddThumbColumn' ); add_action( 'manage_banners_posts_custom_column', 'fb_AddThumbValue', 10, 2 );
You might need to do a little more research on those actions and filters though, as well as making sure this is for non-hierarchical custom post types.
Hope that helps~
I still haven’t been able to get this sorted out … have you come across anyone else that has wanted to show the connected posts separated by taxonomies?
I implemented a dropdown select similar to the date fields meta data example, but, soon realized that a meta data type workaround wasn’t going to work in my situation. Separate taxonomies have to be the way on this instance.
I feel like I’m must be missing something really obvious, but, I’ve yet to work out what it is … will keep trying. I’ve checked all over the forums and such but, your code is so new the only real examples are here, and I haven’t found any others trying to do this … so … if you hear any workable solution before I find it pretty please will you post it back here? ??
I had tried using just connected previously, but, went ahead and changed to using
p2p_register_connection_type( 'product', 'solution', true);
and just connected instead of connected_from again, but same result …
no foreach, and by no foreach I mean no foreach ?? heh. The posts come through properly.Without the connection I get all of the posts in the taxonomy and each of the taxonomy headers in place above each list.
Without the connection I get the first taxonomy header, then a list of the connected posts as expected, and then the rest of the taxonomy headers.
I deduced that to mean the query is running properly,
the while is while working,
but not the foreach.The only directive ( I lack any knowledge of the proper terminology .. sorry ) based on the foreach is to give me each of the taxonomies names in a header, and that’s the only directive that doesn’t work when I make the connection active.
It works for the first loop through, then breaks and lists the connected posts and then goes back to giving me the headers. So, it appears to be interrupting the foreach somehow.
I’m stumped.
Forum: Plugins
In reply to: Query Multiple Taxonomies and JstreeWow. Nice script. Wish I’d come across that before implementing JsTree, although I think they are all branching from a similar place. This one seems much more … well, easy to implement? JsTree was really overkill for what I needed and never did have time to get the cookie sessions working on the site, but, for the front end, it’s serving its purpose well enough … for now. The backend category/taxonomy meta box selections are of course where this is really needed. I wonder if getting a script like this into the core hierarchical taxonomy/category metaboxes would be something core dev would be willing to consider? That sure would be swell … hint hint. My client has to scroll through a few hundred nested taxonomies to make selections for each custom post type post. Bummer. Long time no talk by the way … hope things are groovy.
Well, hip hip hoorah. All fixed ?? Thanks Scribu!
haHA! Got it. You worked with Lester on WP-Useronline. He puts his name so big “Lester ‘GaMerZ’ Chan” that I never saw you there … man, I’ve been using that plugin forever too. Well, cool, that clears that up. But there is no more current version of that plugin is there? Should I just rename the function?
Yes, I don’t know if you remember, but you made category checklist tree work with taxonomies for me ?? I believe I am still using the latest version. It’s 1.1-beta. I couldn’t find anything more current than that. My plan is to get this plugin working with jsTree as well, but, I’ve got to get that cookie issue sorted out with it first.
I’m pretty darn sure I didn’t put my grubby little paws on this one. The issues I was having were all ironed out with the filters you provided pre-uploading it. It’s the 1.3.1-alpha version. I just ran Mr. backtrace and emailed you the results~
Thank you for the introduction … very nice guy, concise and to the point. ??
Just this week, I’m finally getting down and dirty with learning how to debug … it’s time.
I’m being advised to stop using my dear Coda program, and move on to something like phpStorm to do my work, in order to achieve this … waah, and I’m reading and absorbing as much info from all over the place as possible … while still trying to meet my current site deadline. As well, I’m not taking any more work after this.I’m going to be concentrating full time on taking my brain to the next level.
I just did a couple hours reading and exploring all the info I could find on “using debug_print_backtrace()”.
You know though, it’s the basic fundamentals that get me. The things that most folks learn in school or classes, and that almost all the help you find on this level expects you to already know, stuff like “where to put a great debugging function like debug_print_backtrace()” and where to look for it’s output … I know, pretty much a big DUH for most people. But I’m home-grown, so, it’s a little different for me. I learn by necessity and desire, and always put in the extra time to make sure that what I’m learning is the most recent, most effective, best practice method, so, a little slower, and a lot of the fundamental building blocks are missing.
As well, most examples I find need to be slightly altered to be applicable to WordPress. Aside from some beginning classes in Basic, back in college ( wanted to be an architect before becoming a pro athlete ), and then publishing a magazine for 13 years, (which gave me my expertise in graphics, computer admin, yadda yadda), all of my recent learning and application has been in direct relation to building in wordpress.
That said, and to give an example of my point though … I now understand more about the debug_print_backtrace() function itself and what it does, which I fully comprehend, than how or where exactly to use it. heh.
Good news is I’m like a cat with a ball of string, so, I’ll get there. I go nuts when I have a question in my head and no answer.
This would also explain why subscribing to the rss feed of my favorites hasn’t been so effective at keeping track of responses on here. I have way too many feeds, as I seem to think that I can read 1000+ pages a day. hah.
As always … Thanks for all your advice … and the hospitality of your introductions … the sponge
I really need a better way of notifying myself when there is a response here. Again, sorry for the delayed response~
I’m not using the qmt_add_term_filter, I am using these:
//QMT: Add base url for Query Multiple Taxonomies-------------------------------------------------// function my_qmt_base_url( $url ) { $ptype = get_post_type_object(get_query_var('post_type')); $plural = sanitize_title_with_dashes($ptype->label); return get_bloginfo('url') . '/' . $plural; } add_filter( 'qmt_base_url', 'my_qmt_base_url' ); //QMT: Add title filter for Query Multiple Taxonomies ---------------------------// function custom_qmt_term_list_title( $title ) { return str_replace( array( '<h4>', '</h4>' ), array( "<ul><li><h2 class='widgettitle'>", "</h2></li></ul>" ), $title ); } add_filter( 'qmt_term_list_title', 'custom_qmt_term_list_title' ); //QMT: Remove Canonical Redirect---------------------------// function cancel_redirect_canonical( $redirect_url ) { if ( is_tax() ) return false; return $redirect_url; } add_filter( 'redirect_canonical', 'cancel_redirect_canonical');
Well, at least part of this is beginning to make sense.
Without my custom post type archive code active,
and with my cancel_canonical_redirect active,I get the taxonomy.php template, properly styled, with one or more terms added to the filter.
With the custom post type archive code activated,
I get the custom_post_type archive.php template when one term is clicked/added to the filter,
and the taxonomy.php template, when a second or more filter is added.
This confirms, at least to me, that not only is my illegal offset issue coming from this code, preventing my request filters from working, but, the rewrites are obviously also interfering with the QMT rewrites.
Geesh. Okay, off to figure this out~
Sorry for wasting your time on this issue, as this obviously doesn’t even have anything to do with what QMT is doing. Argh.
Aside from that little array bug, QMT is functioning beautifully and again I want to say thanks for that.
Alright, here are the results with the custom post type archive code removed.
With
//QMT: Cancel Canonical Redirect---------------------------// function cancel_redirect_canonical( $redirect_url ) { if ( is_tax() ) return false; return $redirect_url; } add_filter( 'redirect_canonical', 'cancel_redirect_canonical');
active in my functions file, and this url in the browser
https://cotaprogram.org/cotadev/lessons?grade=grade-one
I get the proper response of the taxonomy.php template being used, and the post_type query vars conditional being respected. This is the expected behavior. yay.
If I then remove the cancel_canonical_redirect, and put in the same url,
https://cotaprogram.org/cotadev/lessons?grade=grade-one
The url redirects to this
https://cotaprogram.org/cotadev/grade-level/grade-one
and the taxonomy.php template is still used, but, this time with the query var conditionals not being respected.
I will now do the same test with the debug code active:
cancel_canonical_redirect is active and debug code is active
url is https://cotaprogram.org/cotadev/lessons?grade=grade-one
I get the same result as above with the taxonomy.php template being used and post_type query var conditionals being respected
Debug message is:
Array ( [post_type] => lesson [grade] => grade-one [taxonomy] => grade [term] => grade-one ) Array ( [grade] => grade-one ) bool(true)
and now with the cancel_canonical_redirect removed and debug code active,
same url
https://cotaprogram.org/cotadev/lessons?grade=grade-one
url stays this:
https://cotaprogram.org/cotadev/lessons?grade=grade-one
and I get a blank page with this debug message:
Array ( [post_type] => lesson [grade] => grade-one [taxonomy] => grade [term] => grade-one ) Array ( [grade] => grade-one ) bool(true)
Warning: Cannot modify header information – headers already sent by (output started at /home/cotapr5/public_html/cotadev/wp-content/themes/cota/functions.php:585) in /home/cotapr5/public_html/cotadev/wp-includes/pluggable.php on line 890`
Well, this is really scrambling my brain. I hope, actually, I’m sure, all of this makes perfect sense to you and I’ve probably given you a whole crazy load more info than you actually needed to see what’s happening, but, I guess better safe than sorry.
The array error is still there when a term is clicked as well, I don’t know if that has any relation to this:
I’ll send a screenshot of that if you want me to~
I guess the end goal, if I can clear my head enough to remember the goal, is to end up with this url:
https://cotaprogram.org/cotadev/lessons?grade=grade-one
becoming this
https://cotaprogram.org/cotadev/lessons/grade-level/grade-one
using the taxonomy.php template with the post_type query var still being respected to allow for the template to show only the taxonomy results and styling for that specific post type.
base url with no terms goes back to https://cotaprogram.org/cotadev/lessons
Wow. I really wished that the custom_post_type archive template had made it in to 3.01, I know there is a ticket in, so waiting with baited breath. This has been such a ball of twine to unravel ??
If I can get this worked out, then, I still need to figure out why the custom archive code is causing the illegal offset errors.
Thank you for your patience with me Scribu. I know it must get annoying~