Image not showing up in media loader success area – followup

untested, but it should work theoretically: add_filter(‘get_attached_file’, function($path, $file, $attachment_id){ // get the post object of the current attachment $att = get_post($attachment_id); // prepend attachment post parent ID to the file name return substr_replace($path, “{$att->post_parent}/{$file}”, -strlen($file)); }); Another filter, attempts to “fix” the path returned by WP’s upload handler: add_filter(‘wp_handle_upload’, function($results){ global $post; if(empty($post)) return … Read more

Make custom system url

Create a custom page template: <?php /** * Template Name: Random PHP */ get_header(); //add random PHP get_sidebar(); get_footer(); ?> Create a page in WordPress, give it the title portfolio. In the template select box choose Random PHP

Hook for feed creation?

It depends what you want to do as for when you want to hook into the process. the_content_feed is fired for each item in your feed, so this probably isn’t the one you are after. You could use pre_get_posts which fires just before WordPress queries the database: add_action(‘pre_get_posts’, ‘catch_the_feed’); function catch_the_feed($query){ if($query->is_main_query() && $query->is_feed()){ //It’s … Read more

Is there an URL listing latest posts

As mentioned in the comments, you want to replace your home page with a static front page under Settings > Reading. Then you’ll create a new page and set it as your posts page in the same setting. The slug of that new page then determines the URL of the posts page.

Extracting a variable from a permalink

You can get the queried author in author.php with get_queried_object(): $author = get_queried_object(); echo $author->ID; $author_data = get_object_vars( $author->data ); echo $author_data[‘display_name’]; echo $author_data[‘user_url’]; echo $author_data[‘user_email’];

How i can get the URL?

Use site_url <?php echo site_url(); ?> http://codex.wordpress.org/Function_Reference/site_url Or get_site_url <?php echo get_site_url(); ?> http://codex.wordpress.org/Function_Reference/get_site_url Or even home_url <?php echo home_url(); ?> http://codex.wordpress.org/Function_Reference/home_url which returns the home URL for the site. Check the doc links for differences in available parameters.

URL problem: www.sitename.com/blog and www.sitename.com/learn using same WP installation

Not sure I exactly understand your problem, but it sounds like what you want to do could easily be accomplished using Custom post types: http://codex.wordpress.org/Post_Types#Custom_Types This would basically allow you to have an entire segment just for ‘learn’ completely separated from your general posts/blog – you could even give ‘learn’ it’s own styling by using … Read more

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