Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

[SOLVED] Wrapping sidebar with class="nocontent"


  #1  
Old Jan 4, 2012, 07:27 PM
ymf
 
61 posts · May 2009
[SOLVED] Wrapping sidebar with class="nocontent"

I'd like to have something like
HTML Code:
<td id="right-inner" class="nocontent"> ... </td>
i.e. surround a sidebar (footer, header, widget...) area with a class="nocontent". Preferably, I'd like to do it without having to modify the theme's code .

Why I want it? -- to tell Google Custom Search that the sidebar has a boilerplate content that's not relevant to the main content of the page. When Google Custom Search sees this tag, they ignore any keywords it contains and won't take them into account when calculating ranking for the Custom Search engine (see http://support.google.com/customsear...answer=2364585).
  #2  
Old Jan 5, 2012, 06:15 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
the only way to do it, currently, is to modify the theme code.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jan 5, 2012, 08:09 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
why not add a text widget and put your boilerplate in it wrapped in a div with that class.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Jan 5, 2012, 08:53 AM
ymf
 
61 posts · May 2009
I want to exclude from Google Custom Search Engine (CSE) indexing the whole side bar with all its widgets. Not just one particular "boilerplate" widget.

For (an artificial) example, say I have a post titled "Hello World" placed in the category "Hello World" and also tagged "Hello World". When I search for a phrase "Hello World", I want Google's CSE to return precisely that one particular post. However, the words "Hello World" will be picked by "Recent Posts / Recent Comments / Categories / Tags" and who knows what other plugins, and placed on the navigation sidebars of all blog pages. I may also have an external blogroll link conveniently named "Hello World" -- it will also be in the navigation sidebars of all blog pages. Thus, the Google CSE will return all (irrelevant) blog posts, not just the one titled "Hello World".

My opinion: since Google stepped in with this class="nocontent" idea, we should all take a notice. It would be nice if Atahualpa could support this new concept in some future version.
  #5  
Old Jan 5, 2012, 09:14 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
for now you will need to edit header.php for the left and left-inner sidebars and footer.php for the right-inner and right sidebars.

actually it would be nice if someone created a plugin that would add that option to each widget you use.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old Jan 7, 2012, 03:15 PM
ymf
 
61 posts · May 2009
wordpress.org/extend/plugins/zigwidgetclass/ seems to be exactly what the doctor prescribed:
Quote:
ZigWidgetClass adds a free text field to each widget control form on your widget admin page. Enter a class name in the box and it will be added to the classes that WordPress applies to that widget instance. It only works with widgets created by extending the built-in multi widget class
I will try it. People praise that this "ZigWidgetClass" plugin is compatible with "Widget Logic" plugin, another intriguing little gem.

Bookmarks

Tags
cse, google custom search, nocontent

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Menu bar has duplicate specification of attribute &quot;class&quot; hollidaysjohn Page & Category Menu Bars 4 Aug 23, 2010 11:45 AM
Can't figure out how to add code to display in <div class="opacityright"> schabadoo Header configuration & styling 3 May 24, 2010 05:40 AM
[SOLVED] &quot;class&quot; appearing above header and navbar DesignFlute Header configuration & styling 6 May 7, 2010 12:50 PM
Need to call <li class= "current-cat-parent"> for single posts b1tzmast3r Page & Category Menu Bars 5 Jan 25, 2010 02:48 PM


All times are GMT -6. The time now is 06:28 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.