WordPress 4.9.6 – IncludeMe & getAjax GET using wrong URL

If I run a curl command: curl ​https://theprepared.life/data/earthquakes-today.json I get back the json object correctly. So your server work properly. So unless from a different origin, when you running $.getJSON() call, you only need to submit data/earthquakes-today.json as the url, instead of the entire url, which caused the 404 error. $.getJSON(“data/earthquakes-today.json”, function(data) { // rest … Read more

URL Structure for translated articles

One option is a Rewrite Endpoint (or multiple endpoints). The language would be appended to a single post URL, all translations could be stored in post meta attached to that single post. For example, the article URL is: http://example.com/article-1/ with a single endpoint the translated article could be: http://example.com/article-1/lang/de/ The code for adding that endpoint … Read more

Blog post Links leading to home page [closed]

Delete you .htaccess file in root Reset your permalink structure If have access to the theme file make sure your blog title link refers to the_permalink() as destination. you might have open anchor tag from the logo which developer forgot to close.See page source or inspect it. Share the code in your loop.

Return raw image proxy for wordpress plugin

I circumvented the issue with the following hack of images.php. <?php // Import wordpress API. require_once(‘../../../wp-load.php’); function hinews_get_image($id) { if (array_key_exists(‘mimetype’, $_GET)) { $mimetype = $_GET[‘mimetype’]; } else { return ‘No MIME type specified.’; } $options = get_option(‘homeinfo_news_options’); $parm_token = ‘?access_token=’ . $options[‘token’]; $base_url=”https://myurl.com/”; $image_url = $base_url . $id . $parm_token; $image = file_get_contents($image_url); if … Read more

Change WordPress names duplicate titles (url)

For details please see this answer : Remove Dash/Hyphen From WordPress CustomPosttype Permalink In your functions.php : function no_dashes($title) { return str_replace(‘-‘, ”, $title); } add_filter(‘sanitize_title’, ‘no_dashes’ , 9999); For particular type of post : function no_dashes( $slug, $post_ID, $post_status, $post_type ) { if( $post_type == “page” ) { $slug = str_replace( ‘-‘, ”, $slug); … Read more

i1.wp.com url problem (Jetpack not installed)

I found the answer to your question. I’ve created a simple avatar plugin. (I edited and developed the code) if ( !function_exists( ‘get_avatar’ ) ) : function get_avatar( $id_or_email, $size=”0″, $default=””, $alt = false ) { if ( ! get_option(‘show_avatars’) ) return false; static $default_url; if ( !isset( $default_url ) ) $default_url=”http://example.com/image/my-image.png” ; if ( … Read more

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