Support » Fixing WordPress » when adding new or updating posts, content is overwritten with other another pos

  • Very wiered!!

    I have installed, moved, and worked on many wordpress projects and of cource on my website I come across a weird issue. after developing my site on my local server I updated to wordpres 3.01 from 2 something. Worked fine so I moved it to my live web server changed all urls in db etc. and noiw the issue

    Anytime you update a post, doesn’t matter if you are adding a new post or editing an old post. It over rights the content with one of my older posts and is always the same post content that it uses. No matter what.

    Any suggestions??

Viewing 1 replies (of 1 total)
  • No replies so last night I deleted my wordpress installation and started over..

    After importing content, uploading template files, images etc. I tried again and was able to isolate the the issue to my shortcode function. But this worked fine in ver 2.6 and now in 3.0 has issues but posts that came from my prievious installation still work and they have my shortcode.

    Any Ideas

    // [myrelatedProjects jskey="Flash,Control System"]
    function myrelatedProjects2($atts) {
    	extract(shortcode_atts(array( "jskey" => '' ), $atts));
    	$dablogurl = get_bloginfo("wpurl");
    	$jstags = $jskey;
    	$jshtml = "<p style='margin-left:20px;'>";
    	$jsstep = 4;
    	//--- now lets pull 5 projects with the same tags ------------------>>
    		$getjsPosts = new WP_Query("cat=95,97,94&tag=".$jstags."&post_type=post&orderby=date&order=ASC");
    		while($getjsPosts->have_posts()) : $getjsPosts->the_post();
    			$dapostid = get_the_ID();
    			$jsImageUrl3 = get_post_meta($dapostid, 'imageSlider', true);
    			$jsPostUrl = get_permalink($post->ID);
    			$jsImageUrl4 = explode(".", $jsImageUrl3);
    			$jsImageUrl = explode("-", $jsImageUrl4[0]);
    			$jsImageUrl2 = "";
    			$jsImageAlt = get_the_title($post->ID);
    			for ($jstemp=0; $jstemp<=sizeof($jsImageUrl)-2; $jstemp++){ $jsImageUrl2 .= $jsImageUrl[$jstemp] . "-"; }
    			if ( $jsImageUrl2 == "" ){ $jsImageUrl2 = $jsImageUrl4[0] . "-"; }
    			$jsImageUrl2 .= "100x100.jpg";
    			if ($jsstep >= 0){
    			$jshtml .= '<a class="view" href="'.$jsPostUrl.'">
    							<img class="daborder2" style="margin-left: 5px;" src="'.$dablogurl.'/wp-content/uploads/'.$jsImageUrl2.'" alt="'.$jsImageAlt.'" width="100" height="100" />
    			/*if ($jsstep == 0){ }*/
    	$jshtml .= "</p>";
    	return $jshtml;
    add_shortcode('myrelatedProjects', 'myrelatedProjects2');

Viewing 1 replies (of 1 total)
  • The topic ‘when adding new or updating posts, content is overwritten with other another pos’ is closed to new replies.