Getting out side of wp root folder from function.php using absolute path

If you want the absolute path to your theme’s stylesheet directory you could use get_stylesheet_directory(). If you want the URI of your theme’s stylesheet directory you could use get_stylesheet_directory_uri(). get_theme_root() will return the absolute path to the themes directory. get_home_path() will return the absolute filesystem path to the root of the WordPress installation. Once you’ve … Read more

Creating custom post type posts and associating them with a post from another custom post type

Taken literally your question is about post to post relationships. Bad news — WordPress core doesn’t do post to post relationships. However there are some solutions ranging from frameworks like Posts 2 Posts to plugins like Post Connector. Stepping a bit back though, structure you are describing strongly implies grouping of posts. The mechanism for … Read more

Include drafts in internal link dialog

This is very similar to this question. We have to hook into check_ajax_referer to address the internal linking feature only. Then we register an action for pre_get_posts to extend the search to drafts and pending posts. We will still get no pretty permalinks, because they are excluded in get_permalink. So we register a filter for … Read more

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