How do I remove the permalink from appearing when hovering over blog title and leave a comment ?

  • ianizaguirre

    #7895

    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? :

    FOUND THIS

    Mod

    Kenneth John Odle

    #39733

    What error are you getting?

    ianizaguirre

    #39734

    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' => '&nbsp;',

    );

    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 );

    Prasanna SP

    #39735

    Remove last function and put “Permalink to .. ..” in the array of previous function. i.e

    array (
    'Category Archive: .. .. ..' => 'Latest Articles .. ..',
    'Permalink to %s' => '&nbsp;'
    );

    Sent from mobile.

    ianizaguirre

    #39736

    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

    ianizaguirre

    #39737

    is there anything I can replace ” &nbsp ” with because I think that’s whats causing an empty block to appear ( as it is acting as a space) ?

    Mod

    Kenneth John Odle

    #39738

    Try

    $strings = array(
    'Permalink to %s' => '',
    );

    ianizaguirre

    #39739

    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

    Prasanna SP

    #39740

    Add this to Custom <head> tags in Graphene Advanced Settings,

    <script type="text/javascript">
    jQuery(document).ready(function($) {
    $("#content-main a").attr('title', '');
    });
    </script>

    ianizaguirre

    #39741

    Yes that removed the floating square , thank you

Viewing 10 posts - 1 through 10 (of 12 total)

You must be logged in to reply to this topic.