Cannot change hover color for links [closed]

You can avoid all this redundancy if you analyze carefully and see where the error is originating. Chrome developer tools or Firefox is great to help you debugging. You are actually trying to style the link, but the link has a span inside of it, each with its own class. A quick and dirty solution … Read more

with PHP within splits the link

What you are doing isn’t ever going to work the way you want. the_terms() is going to produce a list of complete a tags so you can’t nest or merge it with another one like you are trying to do. And there are no convenient arguments or filters that would allow you to alter that … Read more

how to replace hostnames on certain external links?

If the links are coming from the main content areas, you could create a hook which acts against this “content” output. In your themes functions.php file, you could try something like: add_filter(‘the_content’, ‘the_url_filter_function_name’, 30); function the_url_filter_function_name($content) { return str_replace(‘bad-url.com’, ‘good-url.com’, $content); } If the URLs you are looking to modify are being stored and output’d … Read more

How to make current user’s avatar + display name link to their profile?

Use get_the_author_link() or get_the_author_meta(‘user_url’, $user_id). Your code would become something like: $author_link = get_the_author_link(); $header .= ‘<div><a href=”‘. $author_link . ‘”>’ .get_avatar($user_ID, 64).'</a></div>’; $header .= ‘<div><strong><a href=”‘ . $author_link . ‘”>’ . __(“”, “front-end-pm”).’ ‘. fep_get_userdata($user_ID, ‘display_name’, ‘id’) .'</a></strong>’; Watch out with the quotes though, your code seems to use double quotes, I tried to … Read more

Embed/Link external web pages into my WordPress blog (Like Facebook grabs Image, Title, and Description)

Looks like you might be describing embeds which WordPress supports. On https://codex.wordpress.org/Embeds you’ll find a long list of currently supported embeds simply based on the URLs added in your editor. For the embed to work, it’s required to be on a single line with a space above and below. And generally they are constructed during … Read more

Need to change link URL embedded in multiple posts to new link URL

Honestly, the best way to do this is to run some queries on the database using regex to search and replace, after the database has been backed up of course. Before learning more about SQL, I used this: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/, which should work for you in this situation. You download the file, upload it to your … Read more

How to make Link to go on the first post

I’ll assume by “first” you mean “newest”, since if it’s the oldest, then all you’d need would be the url of that post. $latest = get_posts(array(‘numberposts’ => 1)); $url = get_permalink($latest[0]->ID); echo “<a href=”” . $url . “”>Go to first post</a>”; This should give you a link that always goes to whatever is the latest … Read more

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