博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
wordpress 系列之 header 导航
阅读量:6865 次
发布时间:2019-06-26

本文共 914 字,大约阅读时间需要 3 分钟。

使用Menu Maker 进行导航设计的批量处理,使用默认的links表来保存导航

首先安装插件:

 或者 

说明文档:

  1. Upload the menumaker directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Options > Menu Maker and change options and add menus
  4. Place <?php id_menu_maker(); ?> in your templates

上面是原始的安装方式。

此时我们来修改文件。

1,打开文件menumaker.php,添加如下的函数。

//use  the default link table to show links.function sql_menu_maker() {    global $wpdb;//调用系统的数据库配置    $output = '';    $links = $wpdb->get_results ( "Select link_name,link_url from `$wpdb->links" );//系统的数据库查询结果集函数    $output .= "
"; echo $output;}

2,打开需要存放导航的template:

这样以后添加的links 就可以在页面上作为导航显示了,同时呢,也可以自定义导航的css,方便操作。

 

转载于:https://www.cnblogs.com/awinlei/archive/2013/01/09/2853180.html

你可能感兴趣的文章
linux用户和文件目录管理
查看>>
表空间数据结构研究_01
查看>>
mysql 编译安装
查看>>
使用KiWi Syslog Daemon构建日志服务器
查看>>
坐观 “爱情”
查看>>
linux apt-get proxy
查看>>
Spring学习总结1——bean的生命周期
查看>>
我的友情链接
查看>>
Apache Tomcat7+MySQL5.6配置
查看>>
char varchar nvarchar区别
查看>>
iOS原生定位和反编码
查看>>
华为交换机配置命令 华为QuidWay交换机配置命令手册
查看>>
如何解决JSP页面的乱码问题
查看>>
SQL中的Null值
查看>>
细看晶圆代工之争,纳米制程是什么
查看>>
东软java实训第一个项目人力资源管理
查看>>
我的友情链接
查看>>
ESXI GLusterFS ISCSI 构建低端虚拟化解决方案
查看>>
mysql使用
查看>>
[Ubuntu 12.10] Openstack 多节点安装--前期准备&&网络拓扑
查看>>