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.

Check if a different page has any attached images

$args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => null, ‘post_status’ => null, ‘post_parent’ => $post_id ); $attachments = get_posts($args); if ($attachments) { echo “attachments rock!”; } } If you want to make sure the atachements are an image, you would use: if ( $attachments and wp_attachment_is_image( $post_id ) ) { echo “attachments rock!”; }

How to add php within jquery

I see no reason for you to use PHP in your JavaScript file. Enqueue your script properly using the wp_enqueue_scripts hook and then use the wp_localize_script()function to pass your data to your JavaScript code. <?php function wpa67325_enqueue_scripts() { wp_enqueue_script( ‘some_handle’, ‘filename.js’, false ); $translation_array = array( ‘some_string’ => __( ‘Some string to translate’ ), ‘a_value’ … Read more

Custom attributes to javascript tags

I am afraid this is impossible. The markup is hard coded in /wp-includes/class.wp-scripts.php: if ( $this->do_concat ) $this->print_html .= “<script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/70184/$src”></script>\n”; else echo “<script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/70184/$src”></script>\n”;

Fatal error: allowed memory size when after using enqueue_script

The problem is the de-registering the core-bundled version of jQuery, and re-registering using your own, arbitrary version. Do not de-register core-bundled versions of scripts (especially jQuery) in order to register arbitrary/custom versions of those scripts. Doing so can and will cause breakage and unintended consequences. If you’re doing so in order to cause your custom … Read more

Does WordPress has an automatic link parse function?

There is make_clickable which is applied as a filter on comment_text but not on post/page content. You could add it as a filter with… add_filter(‘the_content’,’make_clickable’); Untested. I have not idea how well that will behave. There may or may not be conflicts with already defined URLs, or other markup. I haven’t investigated that. Be aware.