2012-07-26 109 views
-1

所以我有这样的代码,这是在一个名为小部件文本行的小部件。打破了一些东西在WordPress

a:15:{i:8;a:3:{s:5:"title";s:0:"";s:4:"text";s:157:"<div align="center"><A href="http://mvprop.com/Deals-and-Specials"><IMG border=0 
     alt=Deals and Specials 
     src="dealsandspecials.gif"></A></div>";s:6:"filter";b:0;}i:14;a:3:{s:5:"title";s:0:"";s:4:"text";s:153:"<div align="center"><A href="http://mvprop.com/24-Hour-Recording><IMG border=0 
     alt=24 Hour Recording 
     src="24hourrecording.gif"></A></div>";s:6:"filter";b:0;}i:16;a:3:{s:5:"title";s:0:"";s:4:"text";s:147:"<div align="center"><A href="http://mvprop.com/We-Will-Buy-Now"><IMG border=0 
     alt=We Will Buy Now 
     src="wewillbuynow.gif"></A></div>";s:6:"filter";b:0;}i:20;a:3:{s:5:"title";s:0:"";s:4:"text";s:123:"<div align="center"> <A href="http://mvprop.com/FAQS"><IMG border=0 
      alt=FAQS 
     src="faqs.gif"></A></div>";s:6:"filter";b:0;}i:21;a:3:{s:5:"title";s:0:"";s:4:"text";s:136:"<div align="center"><A href="http://mvprop.com/about-mvp"><IMG border=0 
      alt=About MVP 
     src="aboutus.gif"></A></div>";s:6:"filter";b:0;}i:23;a:3:{s:5:"title";s:0:"";s:4:"text";s:163:"<div align="center"><A href="http://mvprop.com/Deals-and-Specials"><IMG border=0 
      alt=Deals and Specials 
     src="dealsandspecials.gif"></A></div>";s:6:"filter";b:0;}i:24;a:3:{s:5:"title";s:0:"";s:4:"text";s:153:"<div align="center"><A href="http://mvprop.com/We-Will-Buy-Now"><IMG border=0 
      alt=We Will Buy Now 
     src="wewillbuynow.gif"></A></div>";s:6:"filter";b:0;}i:25;a:3:{s:5:"title";s:0:"";s:4:"text";s:159:"<div align="center"><A href="http://mvprop.com/24-Hour-Recording><IMG border=0 
      alt=24 Hour Recording 
     src="24hourrecording.gif"></A></div>";s:6:"filter";b:0;}i:26;a:3:{s:5:"title";s:0:"";s:4:"text";s:152:"<div align="center"><A href="http://mvprop.com/Sell-Your-Home"><IMG border=0 
      alt=Sell Your home 
     src="sellyourhome2.gif"></A></div>";s:6:"filter";b:0;}i:27;a:3:{s:5:"title";s:0:"";s:4:"text";s:143:"<div align="center"> <A href="http://mvprop.com/WE-Will-Buy"><IMG border=0 
      alt=We Will Buy 
     src="wewillbuy.gif"></A></div>";s:6:"filter";b:0;}i:28;a:3:{s:5:"title";s:0:"";s:4:"text";s:161:"<div align="center"> <A href="http://mvprop.com/We-Make-An-Offer"><IMG border=0 
      alt=We Will Make An Offer 
     src="wemakeanoffer.gif"></A></div>";s:6:"filter";b:0;}i:33;a:3:{s:5:"title";s:0:"";s:4:"text";s:170:" <br> <font size="2px face="Arial, Helvetica, sans-serif"> <br> Are you an Investor? <br> Are you tired of 
the stock market and looking for a better rate of return? </font>";s:6:"filter";b:0;}i:34;a:3:{s:5:"title";s:0:"";s:4:"text";s:126:"<a href="../../investments/Questions.pdf"><img src="../../investments/top-ten.jpg" width="236" height="250" border="0"></a> 
";s:6:"filter";b:0;}i:35;a:3:{s:5:"title";s:0:"";s:4:"text";s:145:" <div align="center"><A href="http://mvprop.com/investments"><IMG border=0 
      alt=Investors 
     src="151-test-new2.jpg"></A></div>";s:6:"filter";b:0;}s:12:"_multiwidget";i:1;} 

显然我删除或在此代码的某个地方加一个空格。

现在它不工作。现在我该怎么做?第二部分是这个变化。 如果没有办法解决它,有没有一种方法来重建小部件?

回答

1

的是,在您的{WP-前缀} _Options表?

我不知道,如果它可以很容易固定。尝试使用PHP的unserialize()函数读取这些值

但是,您可以通过将字段值设置为a:0:{}并重新开始构建您的小部件来重置它。

+0

好感谢,但也有像没有安装在网站上的小部件。这是一个硬编码,是的你是正确的,这是选项表 – 2012-07-26 06:25:41

+0

你确定没有小部件?这个字段通常是空的(你实际上有'a:0:{}')在新鲜的wordpress安装。 – RRikesh 2012-07-26 06:27:31

0

我只是做另一个小工具来解决我的问题。

相关问题