Today I had a need to change the Home Page Blog Module Title to: Jen's Blog. I want to start adding more blog posts - - posts that aren't tips, a real blog. =) My Blog Module is set to show "My Blog Posts". I thought some of you might need this script, too. It's a simple script that will allow you to change your Blog Module Title from "Blog Posts" to another title. We need two sets of code, one for when the Blog Module is in the Right or Left SideBar columns (your narrow column), and one for when your Blog Module is in any other column.

 

#1 Code for: Blog Module is NOT Located in SideBar Column

  • If your Blog Module is not in the sidebar column, we want to narrow the script down to home page. Why? We don't want to change the Blog Module Title of Member Blogs. I suppose I could have used the replaceWith function. But, this seems to be a good way to do this.
  • Edit Code Below after text('New Blog Title'), and change to your text.
  • Add to Custom Code Box via: My Network/Tools/Custom Code
  • Save.
  • Use of Apostrophe: When writing script, if you need to use an apostrophe for possessive case, you have to use the backslash escape \ character. Here's the example syntax being used on JenSocial: text('Jen\'s Blog');
  • See code under #2 for this syntax.

<script type="text/javascript">
if (typeof(x$) != 'undefined') {
x$('.xg_widget_main .module_blog .xg_module_head h2').text('New Blog Title');
}
</script>

 

#2 Code for: Blog Module is Located in SideBar Column (narrow column)

  • If your Blog Module is in the sidebar column, we want to narrow the script down to the SideBar element (xj_sidebar_content). This prevents the script from changing the Blog Module Header on Member Profile Pages, and possibly messing with titles on the Blog Pages.
  • Edit Code Below after text('Jen\'s Blog'), and change to your text.
  • Add to Custom Code Box via: My Network/Tools/Custom Code.
  • Save.

<script type="text/javascript">
if (typeof(x$) != 'undefined') {
x$('.xj_sidebar_content .module_blog .xg_module_head h2').text('Jen\'s Blog');
}
</script>

 

I can't guarantee I've thought of all cases. Let me know if this changes a Blog Module Title in the wrong place!

 

Enjoy,

Jen

Views: 348

Reply to This

Replies to This Discussion

Jen This doesent seem to work for me I have a the blog section in the larger part of the page 

Ian,

Thank you for bringing this to my attention. I believe I made a mistake in the code. Try it now and let me know.

Sorry about that,

Jen

RSS

Members

© 2024   Created by JenSocial.   Powered by

Badges  |  Report an Issue  |  Terms of Service

Home
VIP Ning Tips