php * Capture user login and add it as timestamp in user meta data */function user_last_login( $user_login, $user ) {}
add_action( 'wp_loginphp echo 'Last seen: '.
我有一个非常奇怪的问题,试图在他们的归档页面中对自定义帖子类型进行分页,我创建了一个名为property的自定义帖子类型,并设置了一个名为properties的归档页面来显示所有这些类型。因此,在我的archive-property.php文件中添加了一个带有下拉框的表单(GET方法),以便用户能够设置他们希望每页显示多少帖子,如下所示:}
// Do loop and other stuff
我将这段代码添加到我的.htaccess文件中以摆脱index.php,但是现在所有的页面404 (超链接被映射到正确的url)<IfModule mod_rewrite.c>RewriteBase /RewriteCond %{REQUEST_FILENAME} !/index.php [L]# END W
我的wordpress页面一直在失败。它不时地工作,这意味着有时提供刷新页面,而另一些则提供Error establishing a database connection页面。检查wp-content/debug.log,它说:
PHP Warning: mysqli_real_connect(): php_network_getaddresses: getaddrinfofailed: No address associated with hostnam