我想更改新帖子的永久链接,同时保留基于wordpress的博客的所有旧帖子的现有永久链接,以保留反向链接功能和社交共享分数。我搜索了整个wordpress插件目录,仅找到一个名为Advanced Permalinks的插件。我尝试了此插件,但无法获得所需的结果。它为所有以前的帖子给出404错误。
在这方面,您能帮助我吗?
我想从侧边栏中显示的最新帖子中删除nofollow代码.我发现将rel = nofollow标签添加到最新帖子的代码位于此处
主题文件夹/示例theme/lib/activity/plugin.php.
这是确切的代码:
private function get_latest_posts( $post_count ) {
// Get the latest posts
$latest_posts = get_posts(
array(
'numberposts' => $post_count,
'order' => 'desc',
'orderby' => 'date'
)
);
// Create the markup for the listing
$html = '<div class="tab-pane" id="recent">';
$html .= '<ul class="latest-posts">';
if( count( $latest_posts ) > 0 ) {
foreach( $latest_posts as $post ) {
$html .= '<li class="clearfix">';
// Add the small featured image
if( has_post_thumbnail( $post->ID ) ) {
$html .= '<a …Run Code Online (Sandbox Code Playgroud)