小编See*_*eed的帖子

从"post title"下面移动自定义列管理链接

似乎我无法弄清楚如何将编辑,删除,查看等...添加到wordpress后端的我自定义列之一.这个想法是当一个悬停在标题上时,获得附加到标题的链接,以附加到不同的列.

这是以下代码输出的内容.

当我将鼠标悬停在作者身上时,这就是我想要的作者专栏中的链接,就像你将鼠标悬停在此截图中的标题上一样; 所有编辑链接.

这是我到目前为止:

add_filter( 'manage_edit-testimonial-quotes_columns', 'view_columns' ) ;
function view_columns( $columns ) {
  $columns = array(
    'cb' => '',
    'date' => __( 'Date' ),
    'tq_author' => __( 'Author' ),
    'tq_quote' => __( 'Testimonial' ),
  );
  return $columns;
}
add_action('manage_testimonial-quotes_posts_custom_column', 'custom_view_columns', 10, 2);
function custom_view_columns($column, $post_id){
global $post;
  switch ($column){
  case 'tq_author':
    echo '<a href="post.php?post=' . $post->ID . '&action=edit">';
    $column_content = the_field('tq_author');
    echo $column_content;
    echo '</a>';
    break;
  case 'tq_quote':
    $column_content = the_field('tq_quote');
    echo $column_content;
    break;
  default:
    break;
  }
}
Run Code Online (Sandbox Code Playgroud)

wordpress

5
推荐指数
2
解决办法
3597
查看次数

如何设置Gruntfile.js来观察SASS(指南针)和JS

我是新手使用gruntjs和nodejs.我想知道如何设置gruntfile,以便它使用watch监视sass文件和js文件编译.

这是我到目前为止:

module.exports = function ( grunt ) {

  "use strict";
  require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    compass: {
      dist: {
        options: {
          config: 'config.rb',
          watch: true
        }
      }
    }
  });

  grunt.registerTask('default', []);

};
Run Code Online (Sandbox Code Playgroud)

任何帮助都感激不尽.谢谢!

sass node.js gruntjs grunt-contrib-watch

5
推荐指数
1
解决办法
1万
查看次数

更改WordPress的登录标签"用户名"

在默认的WordPress登录页面上,如何将标签"用户名"更改为其他内容?

wordpress wordpress-theming wordpress-plugin

3
推荐指数
2
解决办法
1万
查看次数