WordPress.org

Forums

[resolved] Put html code in side bar of (27 posts)

  1. suneetpant
    Member
    Posted 1 year ago #

    [ Please do not post support topics in the Your WordPress sub-forum. Moving topic to How-To and Troubleshooting. ]

    I want to insert some html code onto the right side bar. How would I do that. Pls help

  2. vtxyzzy
    Member
    Posted 1 year ago #

    Use a Text widget and put the HTML in it.

  3. suneetpant
    Member
    Posted 1 year ago #

    Thanks it works but only on the localhost.

    Just see errors on my site "http://www.britrip.com".

    Problem 1 : [ Widgets ]
    After I upload it on the server contents of the right side column which i make using widget not showing at all.

    Problem 2 : [ Menu ]
    Everything is shown correctly in localhost but not after uploading. Why? Pls help.

    Problem 3 : [ Image in the header ]
    It is showing perfectly in localhost, but not after uploading.

    I am not able to figure out, what causing this problem.

    Please HELP ???

  4. Rajan V
    Member
    Posted 1 year ago #

    Hi Suneetpant.,

    Its very normal issue..

    Now you move on live server right..

    Please setup again for widget area on live server (not in localhost)

  5. vtxyzzy
    Member
    Posted 1 year ago #

    There are several HTML errors on your site that might be causing a problem. See them here: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.britrip.com%2F

  6. suneetpant
    Member
    Posted 1 year ago #

    Thanks vtxyzzy for your help. I have remove all the HTML errors wgich were coming before but still Below Three Problems are still there :

    Problem 1 : [ Widgets ]
    After I upload it on the server contents of the right side column which i make using widget not showing at all.

    Problem 2 : [ Menu ]
    Everything is shown correctly in localhost but not after uploading. Why? Pls help.

    Problem 3 : [ Image in the header ]
    It is showing perfectly in localhost, but not after uploading.

    I am not able to figure out, what causing this problem. Pls HELP !!

  7. suneetpant
    Member
    Posted 1 year ago #

    Hi Rajan Pls guide how to setup again for widget area on live server (not in localhost). Actually this is my first website in wordpress that I have uploaded

  8. vtxyzzy
    Member
    Posted 1 year ago #

    What did you upload/copy to the live server. If you copied the entire site, did you use a special tool to replace all the URLs and paths in the database?

  9. suneetpant
    Member
    Posted 1 year ago #

    Well, I have copied the entire site and also replaces all the required Urls. Also I have changed the relevant size of the changed text.

    I manage to solve Problem no 2 and 3. But still not able to show widget on the site. Problem 1 still unsolved. Pls help

  10. vtxyzzy
    Member
    Posted 1 year ago #

    There is no content shown in the sidebar in the HTML on your site right now. Try using just one of the standard widgets, like Archives, to see if that shows up.

    Also, please put the widget HTML in a pastebin and post a link to it here.

  11. suneetpant
    Member
    Posted 1 year ago #

    Pls check : http://pastebin.com/gUUWZc5Q.

    Is this what u asked for?

  12. vtxyzzy
    Member
    Posted 1 year ago #

    What I see in the pastebin is PHP code, not HTML. Please check the pastebin to see if it is the correct code.

    Also, try using just one of the standard widgets, like Archives, to see if that shows up.

  13. suneetpant
    Member
    Posted 1 year ago #

    One of the members guided me to setup widgets once again in live server not in localhost and its a very normal issue. And i m using my clients hosting site named as "ipage.com" WordPress is there but it is somewhat altogether different. Yeah one more thing, i have recently made the same site once again using wordpress 3.8.1 and travelify theme 1.5.1 (latest version) in localhost everything is in perfect order but when i uploaded on the server right sidebar aren't visible. Still same problem.....

  14. Jimmy Smutek
    Member
    Posted 1 year ago #

    It sounds like you uploaded the theme, but not the database?

    If you are not syncing your local database to the remote server, as well as uploading the theme then none of the content you've added locally, such as text widgets, is going to appear on your remote site.

  15. suneetpant
    Member
    Posted 1 year ago #

    Pls check once again : http://pastebin.com/CEgm6z08

  16. vtxyzzy
    Member
    Posted 1 year ago #

    Once again, how did you upload to the live server? If not done properly it will cause all sorts of problems.

    When you move a site, you must replace the old URLs and paths with the new ones. Some of these are stored in the database in 'serialized' form where the string length is stored along with the string. You must use special tools to search and replace the old values with the new ones.

    If you replace an old URL with a new one of a different length, it will break the serialization, causing many different problems.

    If the old site is still available, you can use the steps shown in this article to copy the site: http://wordpress.mcdspot.com/2012/08/22/migrating-a-wordpress-site-step-by-step/

    If the old site is not available, and you still have a copy of the database from that site, you should be able to use this tool to make the changes: http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

  17. suneetpant
    Member
    Posted 1 year ago #

    Pls check this link : http://pastebin.com/jYkf7ZQq

  18. vtxyzzy
    Member
    Posted 1 year ago #

    The string lengths in the code you pasted are not correct. They should be 264 and 219, respectively.

  19. suneetpant
    Member
    Posted 1 year ago #

    Now pls check this : http://pastebin.com/LwR3yL0H

  20. vtxyzzy
    Member
    Posted 1 year ago #

    I suggest you create the data array and use the serialize() function to get the serialized string.

    You can validate serialized strings here: http://blog.tanist.co.uk/files/unserialize/

  21. vtxyzzy
    Member
    Posted 1 year ago #

    Part of the problem in checking your code seems to be that the pastebin is inserting carriage returns into long lines, making it seem invalid to me. Try including it in your post between backticks.

  22. suneetpant
    Member
    Posted 1 year ago #

    No there are no carriage returns in it. Beyond this i m not able to figure out what n where exactly problem is coming. You can check whether strings starting with http really exists or not. Pls help.

  23. vtxyzzy
    Member
    Posted 1 year ago #

    When I copy the code from the pastebin, there are carriage returns in it. Try it yourself. Select the code from the pastebin and test it in the link I gave you.

  24. kmessinger
    Moderator
    Posted 1 year ago #

    vtxyzzy - Once again, how did you upload to the live server? If not done properly it will cause all sorts of problems.

    You need (have) to follow this to move WordPress. If you didn't, start all over.
    http://codex.wordpress.org/Moving_WordPress

    You shouldn't have to look at any html, php, etc.

  25. vtxyzzy
    Member
    Posted 1 year ago #

    If I copy the latest code from the pastebin and take out the carriage returns, the lengths should be 252 and 207.

  26. vtxyzzy
    Member
    Posted 1 year ago #

    You can check a serialized string with PHP code like this:

    $test_string = 'a:3:{i:2;a:3:{s:5:"title";s:0:"";s:4:"text";s:252:"<img src="http://www.britrip.com/wp-content/uploads/2014/02/CallUs.jpg" alt="" style="width:100%; text-decoration:none;" /><img src="http://www.britrip.com/wp-content/uploads/2014/02/contact-dtls.jpg" alt="" style="width:100%; text-decoration:none;" />";s:6:"filter";b:0;}i:3;a:3:{s:5:"title";s:0:"";s:4:"text";s:207:"<p style="font-size:20pt; text-align: center; color:#0D409A">Our Charter Buses</p><img src="http://www.britrip.com/wp-content/uploads/2014/02/sb-fleet.jpg" alt="" style="width:100%; text-decoration:none;" />";s:6:"filter";b:0;}s:12:"_multiwidget";i:1;}';
    
    error_reporting(E_ALL);
    $result = unserialize($test_string);

    This will not give a great deal of detail about the error, but will show whether the string is valid or not.

  27. vtxyzzy
    Member
    Posted 1 year ago #

    See this article for functions that may give more information about a serialized string: http://wordpress.mcdspot.com/2014/02/22/validate-serialized-strings/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.