Remove all link title attributes

Do you want to preserve the images title attribute? If not here is a code that fixes that for you: add_filter(‘the_content’, ‘remove_title_attr’); function remove_title_attr($text) { // Get all title=”…” tags from the html. $result = array(); preg_match_all(‘|title=”[^”]*”|U’, $text, $result); // Replace all occurances with an empty string. foreach($result[0] as $html_tag) { $text = str_replace($html_tag, ”, … Read more

When inserting attachments into a blog post, how can I get WordPress to use the full filename with the extension?

I figured out how to retitle the attachment myself, using a combination of the answers from these two posts: How can I add a default description to uploaded files? Change attachment filename Here’s the code, it’s working on my current WP installation (v4.3) function wpse_retitle_attachment( $post_ID ) { $file = get_attached_file($post_ID); $path = pathinfo($file); $args … Read more

Attach link to pages accoding to tags

If you place the code below in single.php file anywhere you want the links to appear in your posts, or inside a function in functions.php and the function tied to a filter or an action like ‘the_content’, the you shold get a list of links to the posts that have the same tag or tags … Read more

Anchor link on single.php

function new_excerpt_more( $more ) { return ‘ <a href=”‘. get_permalink( get_the_ID() ) . ‘#placeholder”> ‘ . __(‘<br/><br/> Read More’) . ‘</a>’; } add_filter( ‘excerpt_more’, ‘new_excerpt_more’); I think that should do it.

How to remove anchor of current menu item in navbar?

Michelle is right. You could create your own walker and override the default method that creates the anchor. Or you can hack it by doing this: jQuery(document).ready(function($) { var current = $(“#nav_menu_id”).find(“.current-menu-item”); $(current).html( $(current).find(“a”).html() ); }); Where “nav_menu_id” is the id of your menu you wish to accomplish this on. Personally, I would invest the … Read more

Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)

I’m assuming you’re referring to: get_template_directory() get_template_directory_uri() get_template_directory() is an absolute path – so if you’re including a PHP file that is in your template directory this would be a good function to use. If you’re using a child theme and need to reference something in the parent theme you could also use this function. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)