Getting the correct value for a post

I’ve added correct indenting to your question, which should make the problem more obvious. The problem is that you meant: foreach ( $state as $state ) update_post_meta($post_id,’state’,$state->name); What you actually put is: foreach ( $state as $state ); update_post_meta($post_id,’state’,$state->name); Which expands to: foreach ( $state as $state ) { // do nothing } //insert post … Read more

jQuery dialog prints HTML-Tags under WordPress

It’s sort of a longshot, but maybe try something like this: $(‘#button-setup-league’).click(function() { $( “#dialog p” ).html(‘<span>’+wpslm_v_script_vars.delete_league+'</span>’); $( “#dialog” ).dialog({ modal: true }); }); This, of course, requires “#dialog p” to be initially empty, or assumes that its contents can be replaced entirely. If not, maybe you can use the solution above but with a … Read more

How do I create a single WordPress page that will use PHP to include different HTML files based on a vaule in the URL?

Assuming you already set permalinks for your WordPress site, add this to your page.php: <?php include(“http://www.mysite.edu/_sports/static/”.$post->post_name.”.html); ?> $post->post_name would be the slug of your page. If you’re in a page with the slug volleyball-box-score, with the code above, you would get include(“http://www.mysite.edu/_sports/static/volleyball-box-score.html);. If you’re in a page with the slug other-page, you would get include(“http://www.mysite.edu/_sports/static/other-page.html);. … Read more

Resetting Themes Folder to Default

Short answer: No, WordPress does not manage your theme directory, and there is no reset function. There are two important points you should learn from that experience: Always test new software (themes and plugins) in a local installation. Do not just upload something you have not tested before. You could manage the directory or your … Read more

WP_Error message

One of the variables you’re trying to pass into wpdb::prepare is a WP_Error object. WP_Error‘s are like exceptions mixed with return codes: some functions in the WordPress API return WP_Error objects to tell you something went wrong (like get_terms). We’ll need to see more of your code to be more specific, but you can test … Read more