Xml output not places where i want

Shortcodes must return content and not echo it. See any of the examples in the codex for add_shortcode() So your callback function should probably be: function CheckRemoteService($atts) { extract(shortcode_atts(array( ‘name’ => ‘txt’, ), $atts)); $xml = simplexml_load_file(‘my.xml’); return $xml->sites->$name; } add_shortcode(‘checkmyurl’,’CheckRemoteService’);

Need to change contact email depending where user is from

Your themes functions.php is the first file that gets loaded after wordpress, it loads on every page load so you can get a variable with it. You could create a function similar to so and put it in your functions.php of your theme: global $fromwhere; if(isset($_GET[‘from’]) and $_GET[‘from’] == ‘columbiansite’){ global $fromwhere; $fromwhere=”columbia”; } you … Read more

Retrieve post thumbnails

<?php /* Template Name: Ron’s WordPress Answers Template */ include_once(‘header.php’); $args = array( ‘posts_per_page’ => 5, ‘offset’ => 0, ‘category’ => ”,//you have to use the category id # here not the name of the cat ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘suppress_filters’ => true ); $posts = get_posts( … Read more

private functions in plugins

Well, it is not possible, I guess. If you define function in global scope, then it is visible for all code. The only way to make it private for plugin is to use OOP (and it’s recommended way of writing plugins). You can rename this function, but it won’t solve your problem in the long … Read more