WordPress冥王星主题中的Ajax永久链接 [英] Ajax permalink in wordpress Pluto Theme

查看:94
本文介绍了WordPress冥王星主题中的Ajax永久链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

wp主题存在问题,创作者似乎无济于事.它是Ajax驱动的,不支持自定义永久链接...

Having an issue with a wp theme and creator can't seem to help. It's Ajax driven and doesn’t support custom permalink...

因此,一旦网站出现在Google上,所引用的所有链接就会发送到一些似乎不在网站范围内的黑页:

So as soon as the website appeared on Google all link referred send to some black page which seem to be out of the website:

出现在Google中的链接:www.thaiorchid.be/menus/(黑页) 与真实网页相比:www.thaiorchid.be/#menu-item-21

Link appearing in Google: www.thaiorchid.be/menus/ (black page) Compared to the real webpage: www.thaiorchid.be/#menu-item-21

我开始有了以下解决方案的想法: AJAX导航WordPress –永久链接问题,并在联系页面www.thaiorchid.be/contact上进行了尝试,该页面不再重定向到黑页,但与www.thaiorchid.be/#menu-item相比仍然不够完美-19 ...

I start to have an idea of solution with: AJAX navigation in Wordpress - Trouble with Permalinks and tried it on the contact page www.thaiorchid.be/contact which doesn't redirect to the black page anymore but it's still not perfect compared to www.thaiorchid.be/#menu-item-19...

任何想法都将受到欢迎. 非常感谢, 乔纳森

Any idea would be really welcome. Thanks a lot, Jonathan

推荐答案

您的网站没有为非JS浏览器(例如,据我所知的大多数Google机器人)提供适当的备用.这似乎是主题的(严重)缺陷,没有进一步了解.

Your site does not provide an appropriate fallback for non–JS browsers (e.g. most Google bots to my knowledge). This seems a (serious) shortcoming of the theme without knowing it any further.

如果构建正确,则像这样的"AJAX增强"网站应允许通过基本HTML请求访问所有内容.如果客户端中有Java脚本,则最好使用AJAX请求加载相同的内容,例如允许以便更快地加载页面并实现良好的过渡.

If built properly, an "AJAX–enhanced" site like this should allow access to all content through basic HTML requests. If Javascript is available in a client, preferably the same content should be loaded using AJAX requests, allowing e.g. for faster page loads and nice transitions.

另一个问题来自缺少子导航.由于您的子菜单(弹出式菜单)必须使用Javascript才能使用,因此您需要提供一种替代方法来达到越来越深的两个级别的页面.

Another problem comes from a missing sub navigation. Since your sub menu (fly-out) is not available without Javascript, you would need to provide an alternative way to reach pages two levels deep and deeper.

这里有一个示例,说明在没有Javascript的情况下该页面如何/应该工作:

Here's an example on how this page could/should work without Javascript:

1. Visit homepage
2. Click "Menus" in navigation
3. Opens "Menus" page, showing what the "black page" currently shows 
   + proper header/footer 
   + main navigation 
   + sub navigation for all elements in "Menus" fly–out ("Potages, Entrées, …")
4. Click "Potages"
5. View "Potages" page, again with proper 
   header/footer 
   + main navigation 
   + sub navigation for all elements in "Menus" fly–out


我知道,您可能正在寻找一种快速的解决方案,也许是一小段代码或一个插件来解决您的问题.不幸的是,除非您的主题为您提供了帮助,否则这种灵丹妙药不存在.当前的实现只是以一种相当鲁ck的方式简单地处理了"AJAX网站"的主题恕我直言(您将高兴"地知道,大多数屏幕阅读器也将无法访问您的内容),直到您重新构建主题或修复无法访问的网站的结构.


I know, you’re looking probably for a quick solution, maybe a snippet of code or a plugin to resolve your situation. Unfortunately — unless your theme provides you with some help — such a silver bullet doesn’t exist. The current implementation simply approaches the topic of an "AJAX site" in a fairly reckless way IMHO (you will be "happy" to know, that most screen readers won’t be able to access your content either) and until you re–build the theme or fix the structure you’re pretty much stuck with an unaccessible site.

这篇关于WordPress冥王星主题中的Ajax永久链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆