Accueil › Toolset Professional Support › [Résolu] Categories are not working
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | - |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
Marqué : Types plugin
This topic contains 15 réponses, has 2 voix.
Last updated by peterv-6 Il y a 8 années et 8 mois.
Assisted by: Waqas.
I am trying to: click on categories to reveal all entries that are in that category
I visited this URL: hidden link
I expected to see: a list on all company profiles that have selected the category
Instead, I got: a page showing "Oops! That page can’t be found."
when i am in the WP Admin under the relevant custom post type and I click on the number in the "Count" column on the RHS of the table I get the list... but it is not working on the frontend.
I have tried changing permalinks but they make no difference at all.
I have looked at my .htaccess file which seems to be OK... based on http://codex.wordpress.org/Using_Permalinks
it is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Any ideas??
Much appreciated.
Sorry, the link should have been hidden link
and the error message: Nothing Found
It seems we can’t find what you’re looking for. Perhaps searching can help.
cheers
Peter
Looks like the category template is missing from the theme. However, some time, for your custom taxonomies, you need to create a template.
For this purpose, you can duplicate your existing category.php with the name of "category-company-type.php", and it should then render it properly.
Please see http://codex.wordpress.org/Category_Templates for more information.
If you are using Views, you can do this with Views -> Word Press Archives, to design your customized output.
That advice didn't work as I didn't have a category.php file to copy. I tried creating a category.php file based on the archive.php file .. no luck. anyway I thought that in the absence of a category.php file the achive.php file was supposed to work to enable categories to render properly.
Another thing... I had only just recently the Permalink settings to "company-type" but it didn't work before or after.
I have even tried switching themes to twentyfourteen which has its own category.php file... still doesn't work. Any other ideas??
I have set up a view as a parametric search on categories and have got that working... still needs some serious styling though... something I was planning on doing anyway ... but I would prefer to also be able to click on a category and be taken to a list of companies in that category... Which I gather I need a functional category.php file anyway.
Any thoughts??
Cheers
Peter
Thank you for explaining this in detail, this is strange however.
Can I ask for a temporary access to your site? So I can look for more details.
I have enabled your next reply as private, please input all details in that area. Please mention the links to the pages, views, forms, CPTs and configurations in question.
Please take a backup of your site, before proceeding.
Thank you for providing the details. Please allow me some time to work on this. I will update you as soon as I find a solution.
I have just examined your website and fount that:
- your category.php and archive.php (in fact theme template files) are all fine.
- but your theme (or WP installation) looks like some problematic, because this hidden link is WP's native functionality and shouldn't be dependent on any template file and/or theme. Since this doesn't work, means having problems, you might consider followings:
1) Try changing to a native theme of Word Press (i.e. Twenty Fifteen or earlier).
2) Try disabling maintenance mode.
3) Try disabling plugins, one-by-one, and keep checking for the issue. So you can pin point the particular thing.
4) If problem persists, try a fresh WP install (even on local host or on a sub-domain or folder), and try to replicate the issue with a native theme of WP. And later apply your theme and see if the error persists.
As a suggestion, you should also try discussing with your theme author, for a second opinion. There are chances they suggest a better solution (if this turns into a theme dependent issue).
Thanks Waqas
I have tried everything you suggested.. other than turning off the Toolset plugins... I have already done a fresh install previously and that did not work. What I did was restore a backup of my earlier version of the website using UpdraftPlus with their 'Migrate' addon. That earlier version was hosted under techboard.com.au. and I moved to a new hosting account (same provider) under Techboard.co.
What I think I should do is to set up a fresh wordpress install with a different theme - I am not tied to Moesia, reinstall the Toolset plugins and then migrate all data across rather than doing another restore. Can you please tell me if the .CSV file will bring with it everything from Types, CRED, Access, Layouts and views across?
Thanks for your help.
Cheers
Peter
For Toolset Plugins, there's an export/import option, which you can use to migrate Toolset Plugin's related configurations and definitions (CPTs, Custom Taxonomies, Views, CRED Forms, Access Settings). There's also a Module Manager included in Toolset, which can be helpful to migrate these (https://toolset.com/documentation/user-guides/using-toolset-module-manager/).
However, for posts, pages and other content, I think you should use WP's native content export (under Tools).
The CSV import is only supported by Types (https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/).
Waqas
I did what you suggested and the problem still remains.
I created test.techboard.co with my host Dreamhost, did a 1 click install of wordpress to the subdomain.
I installed module manager to Techboard.co, and used that to migrate CPT's, Custom Taxonomies, Views, CRED Forms, Access settings across to techbaord.co.. all good so far.
I then did an export with the WP tools from techbaord.co and then imported to test.techboard.co - data migrated sucessfully.
I installed and activated all of the toolset plugins.
I used twenty fifteen and also tried another theme, Sparkling ... and when I clicked on category links in the CPT "company profiles" I got the same old "no posts found" error message. I did not install the old theme.
I researched other causes of the problem and came up with the possibility of the /tmp folder being full so I checked with my Hosting company but was told that wasn't full and hence not the problem.
So as far as I can tell the problem is with wordpress itself, the version provided by the hosting company, the toolset plugins OR how I have configured them.
I am pulling my hair out and while I would like the situation resolved have been looking at work arounds.
I have set up a parametric search on categories using views that achieves a large part of what I am after... in the absence of the category links working I am forced to make users search again to find another company rather than following the category link. This will only work well if I show but turn off the categories hyperlink.
I set up a content template for company profiles and the line that returns the categories is :
<strong>Category:</strong>[wpv-post-taxonomy type="category" separator=", " format="link" show="name" order="asc"]
I tried deleting the
format="link"
but that did not seem to make any difference to the company profile when displayed.
Any further suggestions on fixing the problem or the work around?
cheers
Peter
Can you please provide me access to your newly setup site? So I can apply some solutions and can play a little bit around.
I have enabled your next reply as private, please input all details in that area. Please mention the links to the pages, views, forms, CPTs and configurations in question.
Please take a backup of your site, before proceeding.
Thank you for providing the access and all details. Please allow me some time to work on this. I will update you as soon as I find a solution.
I just tried to login to your site (hidden link) with the credentials you recently provided, but looks like the username and/or password are incorrect. I have tried different variations of username and password (small letters, caps, proper-case), suspecting a typing mistake, but none of these work.
Can you please check the credentials if these work for you? I have enabled the private details area again, in case you need to provide new credentials.
Thank you for providing the access details. I have tried several things on the site but without any luck. I have forwarded the matter to the relevant Dev Team, for an expert advise or solution (if it's a bug).
I will update you as soon as I hear back.
FYI: I have removed the access info you provided recently, since it was visible to public. Please always use private details box for such information, and insist to enable it, if you don't see it while replying.
I received an update from the Dev Team. Apparently, this is the default behavior of WP Standard Categories and Archives. That these work around standard post types only. The standard categories attached/used with custom post types, need to be handled specially. So generally, you need to create separate templates for your CPT (i.e. archive-company-profile.php).
However, while searching around, I came across a solution, which "enforces" standard category archives to consider your CPT as part of it. I found solution at http://wordpress.stackexchange.com/a/57440 and applied following code to your functions.php file:
add_filter('pre_get_posts', 'query_post_type'); function query_post_type($query) { if(is_category() || is_tag()) { $post_type = get_query_var('post_type'); if($post_type) $post_type = $post_type; else $post_type = array('post','company-profile','nav_menu_item'); $query->set('post_type',$post_type); return $query; } }
Now your category archives work fine (hidden link). You can edit your Word Press Archive (Company types) as per your design.
I hope the issue is fixed now.