While working on a WordPress assignment recently I came across a very beautiful WordPress Buddypress theme (If you do not know what WordPress is head here: What is wordpres?) Buddypress is a wordpress plug-in that turns your typical wordpress website into a community social network. Salutation is a beautiful theme designed exclusively for websites that have buddypress installed. You can display recently active members, User groups, Resources, Community and so on. It also lets you create a your own blog as a user of the buddypress website and also create a new group or join one.
Now coming back to the main topic, how to fix top tabs – sign in and register without upgrading to newer version of salutation theme. Before that, let me explain the structure of this amazing theme and how to go about installing it.
Salutation buddypress theme is installed like a regular wordpress theme from the Appearance -> Themes menu of your dashboard. Simply upload theme theme and activate. I wont go into detail configurations of each and every block of the theme but Sign-In and Register tabs which are displayed at the top-right corner of the website. It gives your user to either log-in or register on the fly from anywhere on the website. Users don’t have to come to home page and click on sign in or register.
Salutation buddypress theme has something called as static blocks which are responsible for displaying these tabs and as well some other sections of the website. For displaying these tabs, you would need to configure them as a widget from the Appearance –> Widgets menu of your dashboard. Have a look at the pictures below to get more idea about it.
Now, to get these contents into your website, you will have to upload an XML file named as: REQUIRED-import-static-blocks.xml. This file contains all required sections and its data that is necessary for your theme to work correctly. You will have to import this file form the Tools –> Import –> WordPress menu of your dashboard. After importing it will ask you to assign the content of this file to some user or you can choose to assign to Admin.
You can also choose to import the optional dummy content from another XML file named as: OPTIONAL-import-full-demo-content.xml.
Now, if you try to modify the contents of the Static content – Sign In and Register from the Static Block Contents –> Static Blocks –> Edit Sign In or Register from dashboard. If you edit the contents of this section from a wodpress Visual Editor and click on Update, it commits the changes along with error into the database and it disturbs or breaks the top tabs navigation of your theme. Reason being the Visual Editor which cannot distinguish the code from white-space or any other cosmetic error.
However, after reading this, if you try to edit the content using HTML editor instead of Visual Editor, you will continue to see the broken tabs something like this:
Options to fix these tabs:
first option is you can download the updated theme from the Themeforest and upload only the new XML files available in the theme ZIP file. According to explanation from the Parallelus who is the desiger of this theme:
There is a new static block content file in the theme. This uses the extra content field at the bottom of the static block edit screen where the WP visual editor doesn’t have any access. To use this new file, first delete the existing tab entries in the static block area (and also from the trash). Next, download the updated theme to get the new XML file. Import the file normally and it will recreate the tab content blocks which should now work.
However, if you do not want to do this configuration and uploading again, here is a tweak for you which I discovered.
Option 1: Even before you upload the XML file of your Salutation 1.2 or older version into your wordpress, make sure what contents you want to show in the Sign-In and Register tabs. Instead of making changes in the static block from the wordpress Visual or HTML editor, simplay open this XML file with Wordpad and make necessary changes in the file and then import into wordpress.
Option 2: If you observe that content of your theme is still getting broken even after following the Option 1 mentioned above, then you should do this:
- Open the Sign-In or Register tab and edit it from the wordpress dashboard
- Edit the content with HTML editor and note the stating and ending tags something like [opening] [/opening]
- Open the XML file with Wordpad and edit the section as per your requirement
- Put mouse cursor right before the [opening] tag and with Ctrl+Arrows, copy the code until to encounter [/opening]
- Make sure you do not copy even a single white-space
- Create a new Static Block by selection “Add” menu from the Static Block menu and in HTML editor, paste the selected code
- Save the new Static Block and make necessary changes into Wdigets so that it now refers to new Static Content for Sign-In and Register
With this, you will see that top tabs Sign In and Register are now fixed and getting displayed the way they should as shown in the image below:
Buy Salutation theme from Themeforest