Tag Info

Hot answers tagged

2

The title attribute is hard-coded in comments_popup_link() unfortunately: echo ' title="' . esc_attr( sprintf( __('Comment on %s'), $title ) ) . '">'; What you can do is catching the generated HTML in a variable and replacing the attribute with an empty string: ob_start(); comments_popup_link(); print preg_replace( '~ title="[^"]+"~', '', ...


1

If the widget is part of the wordpress core, you can see its source in wp-includes/default-widgets.php. If it came with a theme or plugin, you can find the code there. Sometimes widgets will be in an obviously-named widgets.php, but other times you'll have to hunt for them. At some point, each widget has to be registered by calling register_widget. You can ...


1

With markup embedded into the content there is no less tricky way than regex to do it, save perhaps a markup parser like SimpleHTMLDom function remove_image_link_102512($content) { $pattern = '|<a.*?href="(.*)".*>?(<img.*?/?>)(?:</a>)?|'; $content = preg_replace($pattern,'$2',$content); return $content; } ...


1

You could use Gravity Forms and generate a draft of a custom post type on submission. The form could contain the URL and all other fields. Nice thing about Gravity Forms is the fields can all be validated and has decent anti-spam measures. It also has hooks to do other tasks such as the post-generation. When a form submission is received, it can send an ...


1

You answer yourself pretty much - "hidden" does not mean removed. It still works. And yes, the reason would be backwards compatibility which is considered absolute priority in WP. See #21307 Remove Link Manager from core for context and discussion.


1

Spaces are invalid characters in URLs. Your links are broken, whether the posts exist or not and regardless of whether you want the spaces or not. And uppercase/lowercase can get you in trouble too. Some servers are case sensitive so if you have a permalink to http://somesite.com/hello-world a link like http://somesite.com/Hello-World might work or it ...


1

The pdf is itself an attachment post so in wordpress template hierarchy we can create a template named pdf.php Then you can write following code in it which force download the pdf file. <?php if (have_posts()) : the_post(); $pdf_title = $post->post_title; $pdf_src = get_attached_file($post->ID ); $bytes = filesize( $pdf_src ); ...



Only top voted, non community-wiki answers of a minimum length are eligible