Wordpress (5)

Changing The Site URL wordpress

On the Settings->General screen in a single site installation of WordPress, there are two fields named "WordPress address (URL)" and "Site address (URL)". These are also known as the "Home" and "Site URL" settings. They are important settings, since they control where WordPress thinks your site is located. They control the display of the URL in the admin section of your page as well as the front end, and are used throughout the WordPress code. The "Home" setting is the address you want people to type in their browser to reach your WordPress blog. The "Site URL" setting is the…
Read more...

wordpress 切换语言/语言包

  切换语言/语言包 若您是初次安装 WordPress,请点击这里。 下面步骤指导您将现有的英文 WordPress 站点切换为中文。 通过 FTP、SSH 等方式打开并编辑站点根目录下的 wp-config.php 文件。 查找 define('WPLANG', ''); 一行,在第二个参数处填入 zh_CN,变成 define('WPLANG', 'zh_CN'); 并保存文件。 进入站点控制板(dashboard),看到更新提示后进行升级即可。WordPress 会自动从官方网站下载中文语言包并安装。 若您当前正在使用非官方的中文语言包,请您注意:非官方语言包通常会替换 WordPress 程序本身的升级部分,使 WordPress 通过第三方服务器升级,这可能有一定风险。若您不愿使用官方版本的语言包,请务必选择您信任的语言包。至于使用何种中文支持,完全由您自主选择。WordPress 并不会禁止您使用非官方语言包。当然,我们会认真处理您的批评和建议,欢迎联系我们。 如下是卸载非官方语言包、安装官方中文版本的通用步骤。请注意,如果您没有使用非官方版本的语言包,请不要进行下列操作。我们在这里假设您使用的非官方中文版本没有改动您的数据库: 备份数据库。 备份所有文件,并删除博客根目录下除 wp-config.php 之外的所有文件。请注意保留 wp-config.php。 从 cn.wordpress.org 下载最新官方中文版本。解压缩并上传至站点根目录。 (选做)比对 wp-config-sample.php 和留下的 wp-config.php:若 wp-config-sample.php 有新增的内容,请复制并按照说明填写;若留下的 wp-config.php 比 wp-config-sample.php 中的设置项还要多,请删除那些多余的项目。 完成这些步骤,您就在使用官方版本了。我们对您的支持表示感谢。任何意见、建议?请查看“联系”页面。
Read more...

wordpress Changing The Site URL

  Changing The Site URL On the Settings->General screen in a single site installation of WordPress, there are two fields named "WordPress address (URL)" and "Site address (URL)". These are also known as the "Home" and "Site URL" settings. They are important settings, since they control where WordPress thinks your site is located. They control the display of the URL in the admin section of your page as well as the front end, and are used throughout the WordPress code. The "Home" setting is the address you want people to type in their browser to reach your WordPress blog. The…
Read more...

[Plugin: NextGEN Gallery] show Title alt of image instead

  view/gallery.php.   <!-- Thumbnails --> <?php foreach ( $images as $image ) : ?>   <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> > <div class="ngg-gallery-thumbnail" > <?php echo $image->alttext ?> <a href="/<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> > <?php if ( !$image->hidden ) { ?> <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="/<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> <?php } ?> </a> </div> </div> ---------------------------------------------------------------------- In the nextgen plugin dir, edit the file view/gallery.php. Find the line of code for the anchor (link) around the…
Read more...

在任意位置插入小工具 wordpress主题修改 让主题支持小工具

输入以下代码到 /wp-content/theme/themename/functions.php 如果没有可以自己手动创建一个。   <?php if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => '边栏1', // 侧边栏 1 的名称 'before_widget' => '<li>', // widget 的开始标签 'after_widget' => '</li>', // widget 的结束标签 'before_title' => '<h3>', // 标题的开始标签 'after_title' => '</h3>'// 标题的结束标签 )); register_sidebar(array( 'name' => '边栏2', // 侧边栏 2 的名称 'before_widget' => '<li>', // widget 的开始标签 'after_widget' => '</li>', // widget 的结束标签 'before_title' => '<h3>', // 标题的开始标签 'after_title' => '</h3>'// 标题的结束标签 )); register_sidebar(array( 'name' => '边栏3', // 侧边栏 3 的名称 'before_widget' => '<li>', // widget 的开始标签 'after_widget' => '</li>', // widget 的结束标签 'before_title' => '<h3>', // 标题的开始标签 'after_title' => '</h3>'// 标题的结束标签 )); register_sidebar(array( 'name'…
Read more...

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php on line 191
Call Stack
#TimeMemoryFunctionLocation
10.0002403120{main}( ).../index.php:0
20.03731320680Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.03731320680Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.15022977912Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.15143002272Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.15233057600Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.15253074656require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.15763141408K2ControllerItemlist->execute( ).../k2.php:64
90.15763141408K2ControllerItemlist->display( ).../BaseController.php:710
100.16063230496K2ControllerItemlist->display( ).../itemlist.php:49
110.16063230496K2ControllerItemlist->display( ).../controller.php:19
120.16173249392Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.16473270128K2ViewItemlist->display( ).../ViewController.php:102
140.26843873024K2ViewItemlist->display( ).../view.html.php:1407
150.26853873024K2ViewItemlist->loadTemplate( ).../HtmlView.php:230
160.26963943144include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php' ).../HtmlView.php:701