← WordPress

Plugin 404 Error e Comments Feeds

Lida 1988 vezes

Offline

saramgsilva 
Membro
Mensagens 34 Gostos 0
Troféus totais: 21
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 10 Posts First Post

Boas,

lancei recentemente um site, http://www.maneteixeira.com/ e tenho o plugin 404 Error instalado, que me tem informado de alguns problemas.
Um problema que me está aparecer constantemente é:

Citar
404 Report - a file not found error was registered on your site.

404 URL:     http://www.maneteixeira.com/comments/feed/

Referred by:

Por vezes o Referred by, está preenchido com um link que pode ser o  http://www.maneteixeira.com/, como pode ser o  http://www.maneteixeira.com/sobre-mim ou outro...

Eu quando criei os posts, disse que não queria a possibilidade de comentários.

Alguém me consegue ajudar sobre isto?




Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Olá Sara,

Aqui no Mozilla ao abrir esse site, tenho a possibilidade de subscrever ao RSS dos comentários, embora não funcione.

Sugeria eliminares esta linha do teu header.php
<link rel="alternate" type="application/rss+xml" title="Mané Teixeira &raquo; Comments Feed" href="http://www.maneteixeira.com/comments/feed/" />

Cumps
Offline

saramgsilva 
Membro
Mensagens 34 Gostos 0
Troféus totais: 21
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 10 Posts First Post

Boa!

realmente, não me tinha apercebido.

Vou então corrigir :)

Obrigada
Offline

saramgsilva 
Membro
Mensagens 34 Gostos 0
Troféus totais: 21
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 10 Posts First Post

Estive a tentar resolver este problema e até já estou confusa.


Fui ao header.php, que contém:
Código: [Seleccione]
<?php
/* We add some JavaScript to pages with the comment form
 * to support sites with threaded comments (when in use).
 */
if ( is_singular() && get_option'thread_comments' ) )
wp_enqueue_script'comment-reply' );

/* Always have wp_head() just before the closing </head>
 * tag of your theme, or you will break many plugins, which
 * generally use this hook to add elements to <head> such
 * as styles, scripts, and meta tags.
 */
 

wp_head();
?>

A função wp_head() é a responsável pela criação do
Código: [Seleccione]
<link rel="alternate" type="application/rss+xml" title="Mané Teixeira &raquo; Comments Feed" href="http://www.maneteixeira.com/comments/feed/" />

já pesquisei e já tentei usar algumas soluções, mas sem sucesso.

Na pasta onde tenho meu theme, tenho vários ficheiro, nomeadamente o header.php e o function.php



Uma solução que tentei foi

Citar
For anyone wondering, just add the following in your functions.php file:

function remove_comments_rss( $for_comments ) {
    return;
}
add_filter('post_comments_feed_link','remove_comments_rss');


Mas ao inserir isto no ficheiro function.php isto não funciona :/ alguém consegue ajudar?
Offline

saramgsilva 
Membro
Mensagens 34 Gostos 0
Troféus totais: 21
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 10 Posts First Post

Depois de andar aqui a partir pedra, encontrei isto:
Código: [Seleccione]

// Remove links to the extra feeds (e.g. category feeds)
remove_action( 'wp_head', 'feed_links_extra', 3 );
// Remove links to the general feeds (e.g. posts and comments)
remove_action( 'wp_head', 'feed_links', 2 );
// Remove link to the RSD service endpoint, EditURI link
remove_action( 'wp_head', 'rsd_link' );
// Remove link to the Windows Live Writer manifest file
remove_action( 'wp_head', 'wlwmanifest_link' );
// Remove index link
remove_action( 'wp_head', 'index_rel_link' );
// Remove prev link
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
// Remove start link
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 );
// Display relational links for adjacent posts
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 );
// Remove XHTML generator showing WP version
remove_action( 'wp_head', 'wp_generator' );


e o a linha

Código: [Seleccione]
// Remove links to the general feeds (e.g. posts and comments)
remove_action( 'wp_head', 'feed_links', 2 );

removeu-me as referências:

Código: [Seleccione]
<link rel="alternate" type="application/rss+xml" title="Mané Teixeira &raquo; Feed" href="http://www.maneteixeira.com/feed/" />
<link rel="alternate" type="application/rss+xml" title="Mané Teixeira &raquo; Comments Feed" href="http://www.maneteixeira.com/comments/feed/" />

e coloquei antes do wp_head()  a seguinte linha de código.

Código: [Seleccione]
<link rel="alternate" type="application/rss+xml" title="<?php wp_title();  ?>" href="<?php bloginfo('rss2_url'); ?>" />
 />

Resolvendo assim o meu problema!

Não sei até que ponto isto será a melhor forma, mas foi a única maneira que consegui por isto a funcionar.