Return encoded Page Title outside of a loop

Here’s the answer: Load wp_get_document_title(); into a variable. Use ‘rawurlencode’ on the variable. Also, apparently one can use a ” , ” to join to strings and not just ” . “ global $wp; $url = home_url( $wp->request ); $page_title = wp_get_document_title(); ?> <?php echo ‘<p class=”side-bar-buttons”><i class=”fa fa-envelope” aria-hidden=”true”></i> ‘; echo ‘<a href=mailto:?subject=” , … Read more

Non latin post slug truncate

No, it is not entirely possible. WordPress is using Percent encoding to sanitise the slug. You could undo this, and it would deliver nonlatin characters, but the browser would immediately swap these out for percent encoded characters when you tried to visit the page. Wether your database will store these characters, and the table encoding … Read more

Post Content, Special Characters and Filters

Using a snippet of code like this: $hook_name=”the_content”; global $wp_filter; var_dump($wp_filter[$hook_name]); I was able to find a list of all hooked callback functions to the WordPress filter: the_content. I then located a few possible culprits, then searched for their function existence. After narrowing down my list, I came to the conclusion on the hooked callback … Read more

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