Why we do need wp_enqueue_script() function?

According to the Codex: wp_enqueue_scripts() links a script file to the generated page at the right time according to the script dependencies, if the script has not been already included and if all the dependencies have been registered. You could either link a script with a handle previously registered using the wp_register_script() function, or provide … Read more

Replacing static code in a template file with a sidebar and widgets?

To speak generally, you need to define a sidebar for your theme (sidebars contain widgets) and display that sidebar in your template. In your theme’s functions.php file, register a dynamic sidebar using register_sidebar() Create a sidebar.php file in your theme directory that calls dynamic_sidebar() Make sure your other template files (or header.php/footer.php if that is … Read more

How customizable is a self-hosted WordPress blog compared to a Blogger blog?

The front-end customization options in self-hosted WordPress are absolute. You can edit whatever you want in PHP/HTML templates and CSS style sheets. While WordPress comes with single theme (“Twenty Ten” at moment) the availability of third party free and paid themes for it is huge. See: Where can I download WordPress themes from? for good … Read more

Passing postid of Testimonial Custom Post in Shortcode Parameter

Well, maybe you shouldn’t set $args[‘posts id’] as this is not a supported argument for the get_posts function and instead use the “posts__in” argument or instead switch to the “get_post” function if you get the id parameter. Also, i’m not quite sure but i think you have to use quotes in the shortcode. So your … Read more