How do I remove the permalink from appearing when hovering over blog title and leave a comment ?
-
How do I remove the permalink from appearing when hovering over blog title and leave a comment words ?
I found this and thought maybe this is it but I am not sure and I get an error when I try it to test it? :
Mod
What error are you getting?
I get this error : Fatal error: Cannot redeclare graphene_filter_gettext() (previously declared
This is the part that I am putting in that is causing an issue :
/**
* Removes permalink box with info from appearing on hover on top of post titles
*/
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Permalink to %s' => ' ',
);
if ( ! empty( $strings[$original] ) && is_front_page() ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );This is how my functions looks like with everything in it :
<?php
/**
* Modify the footer copyright text
*/
function at_register_sidebars() {
$max_columns = 3; // change to number of columns you want to add to your footer
$text_domain = 'appthemes'; // the text domain to use for translating the strings
foreach ( range(1, $max_columns) as $number ) {
$sidebar_name = sprintf(__('Footer Column %d', $text_domain), $number );
register_sidebar( array(
'name' => $sidebar_name,
'description' => '',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
) );
}
}
add_action( 'wp_loaded', 'at_register_sidebars' );
/**
* Add custom classes for easier styling
*/
function my_body_class( $classes ) {
if ( is_singular() && ! have_comments() ) $classes[] = 'nocomment';
return $classes;
}
add_filter( 'body_class', 'my_body_class' );
/**
* Changes text of blog archive title bar on blog archive main page from category archive name to what you like
*/
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Category Archive: <span>%s</span>' => 'Latest Articles from '<em><span>%s</span></em>' ',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
/**
* Removes permalink box with info from appearing on hover on top of post titles
*/
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Permalink to %s' => ' ',
);
if ( ! empty( $strings[$original] ) && is_front_page() ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );Remove last function and put “Permalink to .. ..” in the array of previous function. i.e
array (
'Category Archive: .. .. ..' => 'Latest Articles .. ..',
'Permalink to %s' => ' '
);Sent from mobile.
Ok I added the code to my Functions like you said Prasanna but now when I hover over the title I get an empty blank square appearing over the title when I hover? Yes it is empty this time but how can I remove the empty permalink square now to ?
Thanks for your help
is there anything I can replace ”   ” with because I think that’s whats causing an empty block to appear ( as it is acting as a space) ?
Mod
Try
$strings = array(
'Permalink to %s' => '',
);no removing ” ” makes the permalink re-appear for some reason ? So I guess that part of the function has to have something in it… Any other ideas to remove this empty floating square on hover?
Thanks for your help
Add this to
Custom <head> tagsin Graphene Advanced Settings,<script type="text/javascript">
jQuery(document).ready(function($) {
$("#content-main a").attr('title', '');
});
</script>Yes that removed the floating square , thank you
Viewing 10 posts - 1 through 10 (of 12 total)
- 1
- 2
- You must be logged in to reply to this topic.
