Replace & with &
It looks like the function returning an url, And is always good practice to use esc_url(); wordpress function to escape all characters including the – & into & before displaying. Example usage – return esc_url( $incomingLink );
It looks like the function returning an url, And is always good practice to use esc_url(); wordpress function to escape all characters including the – & into & before displaying. Example usage – return esc_url( $incomingLink );
<?php function get_all_images($post_id=0, $size=”poster”, $attributes=””) { global $post; setup_postdata($post); $post_id = $_POST[‘post_id’]; if ($post_id<1) $postid = get_the_ID(); $post = get_post($post_id); $get_content = $post -> post_content; $content = apply_filters(‘the_content’, $get_content); $content = str_replace(‘]]>’, ‘]]>’, $content); $title = get_the_title($post); $previous_post = get_previous_post(); $next_post = get_next_post(); $previous_link_url = get_permalink(get_previous_post(false,”,true)); $next_link_url = get_permalink(get_next_post(false,”,false)); if (!empty( $previous_post )) $previous_link = … Read more
If you ‘have’ to do it this way, you should add the following line to the top of your above your include functions line: require(‘/path/to/yourdomain.com/httpdocs/wp-blog-header.php’); global $wpdb; // In case you need DB calls also @milo is correct though and you should think of a better way of doing this… Alternatively, you could look at … Read more
This is more of a PHP question than a WordPress question. Try to replace $temp = explode( “|”, $am ); with $temp = explode( “|”, $am[0] ); since $am is an array. You should also consider using isset() to check if the array items exists. Here is one idea: <?php $affman = get_post_meta( $post->ID, ‘affiliatemanager’, … Read more
Modify the searchform.php, or create one in a child theme (recommended), and you should be able to modify the form all you want. The default HTML is in /wp-includes/general-template.php, to which I have already linked, but don’t edit that. It is a Core file. Copy the markup into your searchform.php if you need a place … Read more
You have multiple options: The function is pluggable (i.e., you could write up your own wp_mail function and make it do what you’d like). There’s the phpmailer_init hook, which gives you access to the $phpmailer object (and thus lets you AddBcc another email address. There’s the wp_mail hook, which gives you (amongst other things) access … Read more
Note, Session must start before header is sent. So you should try – <?php if( !session_id() ){ if( headers_sent() ){ die(‘headers already sent, cant start session’); } else{ session_start(); } } // check existence, or not below 1 if( !isset($_SESSION[‘impression’]) || $_SESSION[‘impression’] < 1 ){ $_SESSION[‘impression’] = 100; } // decrease the value by one … Read more
You would need to set up the function like this in your functions.php function my_function(){ //your function in here include(TEMPLATEPATH . ‘[variable][1].php’); } And then in your loop you would call it like so: $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 4, ); $featured_query = new WP_Query($args); if ($featured_query->have_posts()) { while ($featured_query->have_posts()) { $featured_query->the_post(); … Read more
1) see the reference – http://codex.wordpress.org/Custom_Headers or 2) You can insert like this in header.php : <img class=”somethingg” style=”width:400px;height:200px;” ……………. />
You would save the Ajax response to the database. Here are a few tutorials that might be helpful: Tutorial on Using Ajax in WordPress Plugins How to Use Ajax for Data Insertion in WordPress How to Insert Data into Database using Ajax