Getting Permalink within the loop

As suggested, went to the function reference and from there to the Source File (located in wp_includes/link-template.php) in which there are four functions that each return similar results. <?php echo get_post_permalink() ?> http://newdep.localhost/instruments/jester/ <?php echo post_permalink() ?> http://newdep.localhost/instruments/jester/ <?php the_permalink() ?> /instruments/jester/ <?php echo get_the_permalink() ?> http://newdep.localhost/instruments/jester/ In this case, since this is a custom … Read more

Convert a static website to a WordPress theme and import all existing content

WordPress has a perfect wrapper for HTML > Theme conversion: The theme itself. All information can be found in the Codex page. It is enough to add a folder to your wp-content/themes directory (or whatever directory you registered in addition to that), and add the following files functions.php style.css index.php header.php to your custom themename … Read more

Fatal error: Maximum execution time of 60 seconds exceeded in H:\wamp\www\custom\wp-includes\class-wp-http-curl.php

I get that answer. I go to this file: wp-includes/deprecated.php and find this line in (deprecated) wp_get_http() function: @set_time_limit ( 60 ); just comment out this line and it works fine. Because wordpress hard coded that 60 seconds limit, this hard coded setting was over-ridding my php.ini settings. so I comment out that line, my … Read more

Featured Image Size

For post thumbnails you can either crop and image to the thumbnail size or scale the image. To enable crop you can call the thumbnail 1 of 2 ways. Name a size in the functions.php file like so: <?php add_image_size( ‘my-post-thumbnail’, 494, 168, true ); ?> and then call it in the theme file <?php … Read more