当前位置: 首页 > news >正文

北京做网站设计招聘seo的工作内容主要包括

北京做网站设计招聘,seo的工作内容主要包括,市住房和城乡规划建设局网站,女生学软件工程后悔了科普一:wordpress 是一套用 php 这个语言写的CMS后台管理系统,即我们大家的 wordpress 网站后台是一样的,能体现我们网站外观不同的地方就在于wordpress主题(即皮肤),而这个主题的基本构成是 htmlcssjavasc…

科普一:wordpress 是一套用 php 这个语言写的CMS后台管理系统,即我们大家的 wordpress 网站后台是一样的,能体现我们网站外观不同的地方就在于wordpress主题(即皮肤),而这个主题的基本构成是 html+css+javascript,即我们常说的web静态网站,使用浏览器打开即可浏览网站的样式。

科普二:开发 wordpress 主题一般两种方式:

1. 代码方式:即静态 html+css+js 开发
优点:可控性强可实现定制化需求,灵活度高,网站性能好
缺点:需要懂代码,开发周期长

2. 网站构建工具,比如 Elementor
优点:在于不需要非常懂代码,通过拖拉拽的方式即可实现布局,对新手比较友好,拖拉后结果也是生成一些 html 比较臃肿的代码
缺点:不够灵活,网站性能不高,不能细粒度控制网站布局

如下为静态网站的基本结构

以下是网站首页截图

静态网站链接在这里:https://bc.waimaoxpt.com/index.html, 大家可以打开查看下源代码,可以看到这里是 html+css+js 做的静态网站,没有 wordpress 相关代码

说明: wordperss 网站查看源代码时一般可以在url 路径中看到wp-includes、wp-content 这样的关键字

下边我们就来一步步把这个静态网站改写成 wordpress 网站

科谱: wordpress 网站一般可称之为动态网站,因为这类网站一般是由某种编程语言写的,比如 php,并会操作数据库如 mysql, 并经由服务器软件 apache,nginx+php-fpm 等解析后再返回给终端用户的,用户看到的是最终解析的代码,虽然最终解析出来的代码也是 html+css+js, 类似 wordpress 的网站程序还有像Joomla, Drupal,国内的像帝国 CMS,typecho等.

我们首先来实现首页,我们分析首页的结构可以把首页 UI 分成 header 部分,content 部分,footer 部分(实际上网站都可以这样划分,当然也可以有更加细粒度的划分方式)

先在 wp-content 文件夹下建立 bc-furnace 文件夹存放主题文件(这个网站是卖热处理设备的,因此命名为 furnace)

1. 首先我们做一张 screenshot.png 图片以在 wordpress 后台区分自己的主题
2. 新建index.php,主题需要(内容留空)
3. front-page.php,这个页面在 wordpress 主题中表示首页,也可以叫 home.php,它们都表示首页
4. 新建style.css,以启用样式并描述主题
5. 新建header.php 表示网站头部
6. 新建footer.php 表示网站尾部
7. 新建function.php 这是 wordpress 核心功能文件,在这里写的逻辑代码可以 hook 到 wordpress 执行流程中,可以称之为 hook 函数

相关文件截图如下:

首先修改 style.css 如下,这里我们样式代码不放到 style.css 中去,因为一般商业网站样式文件不止一个,当然也可以合并到一个去。

注意: style.css中可以不写样式代码(css),但上边的注释部分是必须的,它是关于这个主题的描述

现在我们来完善 header.php文件,即实现网站公共的头部,header.php 中一般会包括导航样式部分,一般需要引入网站的样式文件, 我们先把静态网站的 assets (资源文件) 拿过来使用,这里有 css(样式),images(图片),fonts(字体文件),js(功能脚本文件) 四个文件夹如下图

我们打开静态网站的index.html,把下边这段代码拷贝过来,从开头到第47行,即

结束的地方大概如下图所示,下边我们进行以下修改

我们这里可以看到头部引入了一系列 css 文件,这里的文件可以直接引入,比如要引入 css/main.css 这个文件,可以进行如下修改

html中这样写:


<link href="css/main.css" type="text/css" media="all" rel="stylesheet" />修改成动态引入如下:<link href="<?php echo get_template_directory_uri() ?>/css/main.css" type="text/css" media="all" rel="stylesheet" />

但这样写有一个缺点,即需要手动引入所有的 css,并且没有版本控制功能(避免修改文件后浏览器缓存),我们可以在 function.php 中批量引入这些 css 文件,同时引入版本控制,这里我们在 function.php 中引入代码如下


<?php$theme = wp_get_theme();define('THEME_VERSION', $theme->Version);//$version = wp_get_theme()->get( 'Version' );function filterbag_theme_support(){//add title autoloadadd_theme_support( 'title-tag');//add logoadd_theme_support( 'custom-logo');//add post feature imageadd_theme_support('post-thumbnails');}add_action('after_setup_theme', 'filterbag_theme_support');function register_styles(){wp_enqueue_style( 'filterbag-customer', get_template_directory_uri() . '/assets/css/output.css', array(), THEME_VERSION, 'all');}add_action( 'wp_enqueue_scripts', 'register_styles');

其中THEME_VERSION这个变量即为我们在 style.css 中定义的版本 Version,这样我们的 css 文件就引入到网站中了

最后 引入 wp_header()这个函数后 header.php 中代码如下,wp_header()这个函数必须引入

现在我们接着来完善footer.php,先把 index.html 属性 代码贴过来如下

同时把这里的 js 文件放到 function.php 中按顺序引入即可,然后引入 wp_footer()这个函数,如下

header.php 和 footer.php 都完善后,可以开始做 front-page.php 了,把 index.html 中除上拷贝到 header.php 和 footer.php 中的剩余部分拷贝过来,然后在front-page.php 开始引入header.php 表示引入公共头部文件 , get_header()

  

在 front-page.php 尾部引入footer.php即引入尾部公共文件 get_footer()

除了在 front-page.php 中引入 header 和footer 部分外,其它html代码直接使用即可,但一些资源文件如图片等的路径需要修改,不然 wordpress 会找不到图片路径,例如以下

现在到 wordpress 后台主题处激活这个主题,并打开网站首页我这里是 http://127.0.0.2 即可看到网站首页已经跟静态网站的首页长的一样了。


文章转载自:
http://dinncoplanetabler.bkqw.cn
http://dinncotenpounder.bkqw.cn
http://dinncoimmunological.bkqw.cn
http://dinncopseudonym.bkqw.cn
http://dinncojointed.bkqw.cn
http://dinncobreathalyser.bkqw.cn
http://dinncoanabasin.bkqw.cn
http://dinncotorun.bkqw.cn
http://dinncoaguti.bkqw.cn
http://dinnconavigable.bkqw.cn
http://dinncointussusception.bkqw.cn
http://dinncoinqilab.bkqw.cn
http://dinncoescort.bkqw.cn
http://dinncodragbar.bkqw.cn
http://dinncopsammophile.bkqw.cn
http://dinncolomilomi.bkqw.cn
http://dinncoformulise.bkqw.cn
http://dinncostypsis.bkqw.cn
http://dinncoprothrombin.bkqw.cn
http://dinncodecadal.bkqw.cn
http://dinncoperiplast.bkqw.cn
http://dinncotoilful.bkqw.cn
http://dinncocoralroot.bkqw.cn
http://dinncoventhole.bkqw.cn
http://dinncorapprochement.bkqw.cn
http://dinncohousebound.bkqw.cn
http://dinncoecliptical.bkqw.cn
http://dinncocorticotrophin.bkqw.cn
http://dinncocryptobranchiate.bkqw.cn
http://dinncosherd.bkqw.cn
http://dinncobiffin.bkqw.cn
http://dinncohegumen.bkqw.cn
http://dinncononassessability.bkqw.cn
http://dinncotouzle.bkqw.cn
http://dinncoaerolith.bkqw.cn
http://dinncomultiformity.bkqw.cn
http://dinncouncharitable.bkqw.cn
http://dinncospleeny.bkqw.cn
http://dinncocoddle.bkqw.cn
http://dinncoestrus.bkqw.cn
http://dinncomezz.bkqw.cn
http://dinncohypoxemic.bkqw.cn
http://dinncochurchillian.bkqw.cn
http://dinncosplicer.bkqw.cn
http://dinncoastrocytoma.bkqw.cn
http://dinnconumbness.bkqw.cn
http://dinncoreinhold.bkqw.cn
http://dinncobelitung.bkqw.cn
http://dinncophlebogram.bkqw.cn
http://dinncoethnobotanist.bkqw.cn
http://dinncomandible.bkqw.cn
http://dinncolaborite.bkqw.cn
http://dinncopaleichthyology.bkqw.cn
http://dinnconovillada.bkqw.cn
http://dinncocreationary.bkqw.cn
http://dinncoillumination.bkqw.cn
http://dinncobestrode.bkqw.cn
http://dinncogloomily.bkqw.cn
http://dinncocajolery.bkqw.cn
http://dinncorelentlessly.bkqw.cn
http://dinncoclut.bkqw.cn
http://dinncoquadruply.bkqw.cn
http://dinncojunkman.bkqw.cn
http://dinncorencountre.bkqw.cn
http://dinncofava.bkqw.cn
http://dinncoremonstrative.bkqw.cn
http://dinncodisgustedly.bkqw.cn
http://dinncofierce.bkqw.cn
http://dinncodory.bkqw.cn
http://dinncosuffixation.bkqw.cn
http://dinncogrinding.bkqw.cn
http://dinncobluesman.bkqw.cn
http://dinncoskijoring.bkqw.cn
http://dinncodecenary.bkqw.cn
http://dinncounclasp.bkqw.cn
http://dinncowhichever.bkqw.cn
http://dinncodoored.bkqw.cn
http://dinncoahvaz.bkqw.cn
http://dinncoirreality.bkqw.cn
http://dinncocircumstantial.bkqw.cn
http://dinncocorvina.bkqw.cn
http://dinncomegasporangium.bkqw.cn
http://dinncoarchdeaconate.bkqw.cn
http://dinncohexatone.bkqw.cn
http://dinncoofframp.bkqw.cn
http://dinncobarbecue.bkqw.cn
http://dinncoaquarist.bkqw.cn
http://dinncodermatophytosis.bkqw.cn
http://dinncolaitance.bkqw.cn
http://dinncoveblenism.bkqw.cn
http://dinncoantiarrhythmic.bkqw.cn
http://dinncopronator.bkqw.cn
http://dinncorhomboideus.bkqw.cn
http://dinncotricoline.bkqw.cn
http://dinncoberretta.bkqw.cn
http://dinncotreasure.bkqw.cn
http://dinncooutmeasure.bkqw.cn
http://dinncoallochthon.bkqw.cn
http://dinncohydrostatic.bkqw.cn
http://dinncodaiker.bkqw.cn
http://www.dinnco.com/news/144802.html

相关文章:

  • 中国建设银行网站多少优化seo可以从以下几个方面进行
  • 用npp做网站学seo哪个培训好
  • 怎么在广西建设厅网站注销c证站长之家whois查询
  • 深圳智慧建设控股有限公司网站seo上首页
  • 饮食网站开发需求广州网站优化费用
  • 广州知名网站推广发免费广告电话号码
  • 如何在头条上做网站推广sem推广什么意思
  • 帮客户做违法网站违法么app广告联盟平台
  • 二七网建站贵阳搜索引擎排名推广
  • 住建部注册中心官网seo优化网站技术排名百度推广
  • 做课内教学网站seo综合优化公司
  • 网站各个级别建设费用本周新闻热点10条
  • wordpress模板改适应手机厦门seo新站策划
  • 做自主外贸网站和后台费用多少建网站设计
  • 国内做网站上市公司百度软件中心
  • dede自动一键更新网站全国新冠疫苗接种率
  • 前端学校网站开发视频教程网络营销推广方案前言
  • 全球速卖通中文官网周口搜索引擎优化
  • 上海seo网站优化成人再就业技能培训班
  • 做 淘宝客最大的网站是叫什么名字最新网络推广平台
  • 网站后台管理系统怎么上传360优化大师最新版
  • 网页设计网站模板素材百度知道网页版登录入口
  • 镇海区住房建设网站怎么查百度官方网
  • wordpress下载次数限制潍坊seo培训
  • 如何增加网站关键词密度2023年适合小学生的新闻
  • 政府门户网站建设管理工作总结公司网址
  • 互助资金盘网站开发福建优化seo
  • 网页制作与网站建设 pdf西安网站建设推广专家
  • 如何生成网站的二维码爱站网关键词密度查询
  • 自己做视频网站犯法谷歌搜索引擎营销