D.Piyavkin
Forum Replies Created
-
Forum: Plugins
In reply to: [MW Taxonomy] Moving terms from taxonomy to taxonomyMats, don’t get me wrong, but by filling the review I had no intention to push you to the work or something. It’s just review in support. Sorry, if I gave you wrong impression.
I’m going to storm the WP internals myself, and also waiting for free time from my regular occupation. When it comes it’s hard to say, but I still feel enthusiastic. )
Forum: Plugins
In reply to: [MW Taxonomy] Moving terms from taxonomy to taxonomyMats,
I’ve added to your plugin my Review/Rating and translation in my native language (probably, should be approved somehow).
Thanks for your help and info!Forum: Plugins
In reply to: [MW Taxonomy] Moving terms from taxonomy to taxonomyThanks for the hints! I will try the plugin, and will experiment on localhost or some testing WP installation.
WP internals and studying
I was occupied in web development in the past, but since lost proficiency. Technologies moved forward significantly. The amount of new opportunities is overwhelming.
Mats, why, by the way, you’ve chosen the WP in the first place? Why not Drupal, Laravel, JS (full stack pack) or something else?
I’ve found the book you’ve mentioned. The book seems promising. I will try it. Thanks for the advice, again!
As to the codex.www.remarpro.com or developer.www.remarpro.com — yes, they have a lot of information. But I can not find there a WP architecture or data base structure (data model). It complicates studying process (at least for me).
DB tweaking
I’m looking at DB, and see it like this.
The relevant information about taxonomies is stored in the tables:
terms — name and slug info for all terms;
term_taxonomy — tree hierarchy is defined here, and also term2taxonomy relation (field taxonomy).
/* I wonder, why fields description and count are placed here, but not in the terms table? And why taxonomy defined as a string (slug?), but not as ID number? */Also I see, that info about categories’ hierarchies saved in the table
options — there is a record with the option_name == category_children, which keep all (?) the parent2child relations for categories in serialized manner (probably, for speed improvement purposes? Probably, some WP functions do it automatically).
So, I guess, minimal set of actions for moving branch from Categories to a Custom Taxonomies manually through changing DB directly should be:
- To find all records for moving terms in table term_taxonomy and to change field taxonomy from ?category? to newly created Custom Taxonomy slug (for example, ?industry?);
- To find in the same table the root term for moved branch and to change its parent field into 0 (if it is not);
- To move the moved branch from the record option_name == category_children of options table to record option_name == industry_children.
Is it correct?
/* I wonder, why there is no separate table for taxonomies description? Why taxonomies addressed by slug/name but not by ID? And where all the information about the taxonomies (core and custom ones) is stored? For custom taxonomies, I guess, it stored in the options table. But where is the description of Categories and Tags taxonomies? */
Possible challenges
?One thing to consider how ever you do it is how to handle the change of url to taxonomy pages if this is indexed by search engines or linked to.?
Yes, that could be a problem. If web site has a history. Some external and internal links could be broken. On the other hand, the problem lays mainly on the SEO part. Any content restructuring activities, which sometimes inevitable, may lead to broken links. And SEO plugins have Redirection functionality because of that. The good one should have: automatic detection of broken links, bulk actions, rules implementation, etc.
In my situation it is desirable outcome, if all the overpopulated Categories just disappear (turn to hidden Custom Taxonomies). Shouldn’t be created in such way (as indexed Categories) from the start.
There may be one more problem with moving terms. Other plugins, themes and functions may use category links and save the information in DB. I see multiple records in the table postmeta, which directly related to category. I guess, it’s something about Menu and some menu may be broken in result. I also see the category links in a some_theme_options record in table options (in my case the old theme isn’t used anymore, but as a possibility).
Yep, the challenge it is. )
Forum: Plugins
In reply to: [MW Taxonomy] Moving terms from taxonomy to taxonomyP.S. Mats, there is unfinished sentence in your post: ?In the plugin MW Taxonomy I …? Probably WP drafts/revisions system gobbled part of it.
Forum: Plugins
In reply to: [MW Taxonomy] Moving terms from taxonomy to taxonomyHi, Mats!
Thanks for your reply, and many thanks for your post — it was really insightful! I’ve never thought that plugin creation may be so simple. I’m in shock (if be frankly). Will experiment with it.
I would like to know WP internals better. But it scares me with its complexity (walls of classes, functions, etc.). Do not know where to start from. Where the ?entry point? in the subject.
?The wish list?
Sure, I’m perfectly aware that you work on the project in your spare time. And I’m not waiting that you provide me (or someone else) any requested functionality immediately (or at all). I’m asking in case I miss some obvious solution or option, trying to reinvent a wheel.
It would be great, though, if such questions happen to be useful in some way and lead you to ideas for future development.
I think you sum up the problem quite right: ?to convert existing categories to custom taxonomies?.
I give you an example. There are standard WP taxonomies Categories (hierarchical) and Tags (flat).
Let’s suppose the Categories taxonomy looks like:
Categories
–Regions
—-North America
——USA
——…/* all the other countries of the region */
—-Europe
——France
——…/* all the other countries of the region */
—-…/* other parts of the world with all the countries of the regions */–Industries
—-… /* One more bloated tree of detailed UN industries classification */–Activities
—-Political
—— /* A lot of terms in the classification of political activities */
—-Social
—— /* A lot of terms in the classification of social activities */
—-… /* etc./There are so many terms that only to scroll down the trees is a boring and time consuming task. And it looks ugly when all the related terms assigned to a single post displayed on the post’s page. Too many different classifications packed in the single Categories taxonomy — it is not good.
The idea is to create Custom Taxonomies like:
Custom_Taxonomy: Regions
Custom_Taxonomy: Industries
Custom_Taxonomy: Activities
Custom_Taxonomy: …(etc.)
And reassign (move) related terms from Categories into the created Custom Taxonomies. For example:
Custom_Taxonomy: Regions
–North America
—-USA
—-…/* all the other countries of the region */
–Europe
—-France
—-…/* all the other countries of the region */
–…/* other parts of the world with all the countries of the regions */The ideal desired functionality should provide an easy way to move any term (and its subterms if the taxonomy is hierarchical one) from one taxonomy (custom or not) to another (custom or not).
I’ve reviewed different Custom Taxonomies plugins. It seems that no one has such functionality yet.
As to me, I guess, it is possible to change DB directly (in phpmyadmin). But there is risk to mess up everything.
——————
Excuse me for such long post.
With best regards,
Dmitry PiyavkinP.S. I thought somewhere there is option ?Forced SSL for Admin? or something like that. But I have not found it (too many settings to be lost among them or may be there is no such option in the plugin). I’m perplexed (a bit).
Forum: Fixing WordPress
In reply to: Book Structure the same as in developer.www.remarpro.comHi, kjodle,
Yeah, before asking I’ve searched for different keywords (“Book(s)”, “Book structure”, “Chapter(s)”, “Serie(s)”, …) for several hours. Have found some interesting plugins for book presentation but nothing exactly the same clear and simple as at developer.worddpress.org. I’m asking in case someone knows exactly what it is (and I shouldn’t reinvent the wheel).
My goal is to publish posts in a usual way. And then some valuable of them to select and to gather in chapters and books in the process. And rehash/reorganize them if needed.
As to creation of the book structure with the basic features of WP, it is possible of course, and some solutions (like usage of categories) are seemed obvious. But in practice it becomes a mess with growing amount of entries: to select proper categories for a post with huge bloated trees of available categories — it becomes a pain. Building of a site map — also. Then the question: how to publish the book with chapters from the chosen categories as a separate section of site in the desirable way? Etc. (Or, I just can not cook it properly.)
With best regards,
DmitryHi Heateor,
OK, I’ve sent email to the address.
And, of course, I’ll do what I can to help with the translation. Thanks for the link. )