将php添加到编辑链接的最佳方式是什么?
例如:插入<?php echo of_get_option(\'dappo_actionbtncolor\', \'dappblue\' ); ?>
进入span标记<?php edit_post_link( __( \'Edit this\', \'mytheme\' ), \'<span class="edit-link">\', \'</span>\' ); ?>
将php添加到编辑链接的最佳方式是什么?
例如:插入<?php echo of_get_option(\'dappo_actionbtncolor\', \'dappblue\' ); ?>
进入span标记<?php edit_post_link( __( \'Edit this\', \'mytheme\' ), \'<span class="edit-link">\', \'</span>\' ); ?>
最简单的方法可能是使用get_edit_post_link()
(Codex ref), 它只返回链接,允许您根据自己的目的根据需要使用它。
我有一组从php文件加载的小部件,如下所示:我添加了一个php代码小部件,并在其中写道:<?php include \'/wp-content/themes/myTheme/parts/block1.php\'; ?> 这在我的localhost上运行得很好,但由于某种原因,当我将该网站上传到网上时,它停止了工作(当然,切换了home和site\\u url)。有什么想法吗?