Disable links to results
-
Hi,
I want to disable the hyperlinks to my results.
When an user does a query I still want to show the results, including the name of page, but I don’t want that the users can click on a link to go the page with the results.
In shortcodes.php I tried to change:
$link = get_bloginfo( 'url' ) . "/?s=$term"; $pre = "<a rel='nofollow' href='$link'>"; // rel='nofollow' for Google $post = '</a>'; return $pre . do_shortcode( $content ) . $post;To:
$link = get_bloginfo( 'url' ) . "/?s=$term"; $pre = "<a class="isDisabled" rel='nofollow' href='$link'>"; // rel='nofollow' for Google $post = '</a>'; return $pre . do_shortcode( $content ) . $post;Any tips? (I know it is a bit weird that I don’t want my users to be redirected to the pages they are looking for)
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Disable links to results’ is closed to new replies.