简体   繁体   English

我想编辑 wordpress 中的每一页。 有可能吗?

[英]I want edit every single page in wordpress. Is possible?

Sorry if this question sounds stupid but im a noob with wordpress.抱歉,如果这个问题听起来很愚蠢,但我是 wordpress 的菜鸟。

I am a javascript developer, and I want make a little game (or games) with wordpress.我是一名 javascript 开发人员,我想用 wordpress 制作一个(或多个)小游戏。 Opening main page there is a sliding puzzle.打开主页有一个滑动拼图。 After complete, a button appears and clicking there you pass to another page.完成后,会出现一个按钮,单击该按钮可转到另一个页面。 This is basically the same to all pages.这对所有页面基本相同。

But I can't find were i put my javascript or HTML code.但我找不到我输入的是 javascript 还是 HTML 代码。 I create the pages but I can't edit them the way I want, everytime i try to do it i only can edit like word.我创建了页面,但我无法以我想要的方式编辑它们,每次我尝试这样做时,我只能像 word 一样进行编辑。 I cant create, change or edit divs attibutes or tags.我无法创建、更改或编辑 div 属性或标签。 To be honest the only thing i can edit is CSS in stylesheet, but is too limited.老实说,我唯一可以编辑的是样式表中的 CSS,但太有限了。

I have done the search, try found a solutions or ways to done it but when i look to tutorials is all diferent from what i see.我已经完成了搜索,尝试找到了解决方案或方法,但是当我查看教程时与我看到的完全不同。

to give you an ideia I want to do a mix of this: -> http://www.rustylake.com/room-escape-games/cube-escape-case-23.html and this -> https://ebonyriddle.com/ to give you an ideia I want to do a mix of this: -> http://www.rustylake.com/room-escape-games/cube-escape-case-23.html and this -> https://ebonyriddle .com/

but i don't know how to edit page to page.但我不知道如何逐页编辑。 can you help me?你能帮助我吗?

Thanks for everything感谢一切

PS: I know I can do it without Wordpress, but I want use it anyway to learn more about the CMS (because of work) maintain website structure and later learn how to do my own templates or plugins. PS:我知道不用Wordpress我也能做到,但我还是想用它来了解更多关于CMS(因为工作)维护网站结构,然后学习如何做我自己的模板或插件。

To answer your question directly, yes it is possible (and easy, relatively speaking) to add custom code to every page / post of a Wordpress site.要直接回答您的问题,可以(并且相对而言很容易)将自定义代码添加到 Wordpress 站点的每个页面/帖子中。

More generally, you're talking about creating a custom Wordpress theme, which you can find out more about here:更一般地说,您正在谈论创建自定义 Wordpress 主题,您可以在此处找到更多信息:

https://codex.wordpress.org/Theme_Development https://codex.wordpress.org/Theme_Development

and here:和这里:

https://developer.wordpress.org/themes/getting-started/ (Good suggestion from @ItsGeorge ) https://developer.wordpress.org/themes/getting-started/ (来自@ItsGeorge的好建议)

Regarding adding custom JavaScript to a theme, your files will need to be enqueued as per these instructions .关于将自定义 JavaScript 添加到主题,您的文件需要按照这些说明进行排队。

Outlining the steps involved in Wordpress theme development would go beyond the scope of your question, but there are plenty of resources online and answers to Wordpress specific questions on wordpress.stackexchange.com . Outlining the steps involved in Wordpress theme development would go beyond the scope of your question, but there are plenty of resources online and answers to Wordpress specific questions on wordpress.stackexchange.com . You will need to familiarise yourself with php as well as JavaScript, to take full control of Wordpress.您需要熟悉php和 JavaScript,才能完全控制 Wordpress。

I would say that developing a game feels like an odd fit... If learning Wordpress is your objective, a blog or personal website might be a better place to start, then you could move onto a game once you are familiar with the concepts involved, eg the loop , which plays a huge part in how Wordpress works我想说开发游戏感觉很奇怪...如果学习 Wordpress 是您的目标,博客或个人网站可能是一个更好的起点,那么一旦您熟悉了所涉及的概念,您就可以进入游戏,例如循环,它在 Wordpress 的工作方式中起着重要作用

Good luck!祝你好运!

The primary focus of WordPress is to put HTML code and JS out of the user. WordPress的主要重点是将HTML代码和JS放在用户之外。 You might manage your extra JavaScript files with your theme customization.您可以使用主题自定义管理额外的 JavaScript 文件。 If you want to get more control about how your pages are rendering, you should use action hooks and filters.如果您想更好地控制页面的呈现方式,您应该使用操作挂钩和过滤器。 The simplest way for you is to override each page template like this https://developer.wordpress.org/themes/basics/template-hierarchy/#single-page最简单的方法是像这样覆盖每个页面模板https://developer.wordpress.org/themes/basics/template-hierarchy/#single-page

The preferable resource to ask Wordpress related questions is https://wordpress.stackexchange.com/询问 Wordpress 相关问题的最佳资源是https://wordpress.stackexchange.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我使用 WordPress 托管了一个网站。 我想仅使用 Javascript 创建一个网页(以演示我的项目)。 我该如何进行? - I hosted a website using WordPress. I want to create a webpage using only Javascript(to demonstrate my project). How do I Proceed? 想要在每个wordpress网站页面的wordpress插件中运行jQuery代码 - Want to run jQuery code in wordpress plugin on every wordpress site page 尝试在wordpress的新页面上添加活动类。 - trying to add an active class on a new page in wordpress. jQuery onClick不在WordPress中触发。 用作.html页面 - jquery onClick not firing in wordpress. Works as a .html page 我无法将JavaScript应用于Wordpress。 你能帮助我吗? - I cannot apply javascript to Wordpress. Can you help me? 我想在WordPress页面内请求JSON - I want to request JSON inside of a WordPress page 我想在javascript中的每个单词上添加单引号和逗号 - I want to add a single quotes and coma on every word in javascript 我想将页面生成为单个 pdf 文件而没有分页符 - I want to generate page as a single pdf file without page break 为什么我不能在 Wordpress 上编辑页面的 html? - Why can't I edit the html of a page on Wordpress? 如何使用内页模板在单个帖子WordPress中每1分钟自动刷新一个div - How to autorefresh every 1 minute a single div in single post wordpress with inner page template
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM