I know that every page has to have a unique name, but what if I don't want the name shown on every page. For example, I might want a How it Works Page and a How it Works 2 page, but I don't want How it Works 2 to be displayed at the top of the page. In fact, I don't want anything displayed at the top. So how do I hide page names?

Views: 68

Replies to This Discussion

Well...whattya know! Figured this one out too. Gotta stop posting these discussions until after I've poked around the code a little. Anyway - here's how I did it. I had to remove the brackets < > since I don't know how to show the code without it embedding into my post. Replace the page name with yours.

script type="text/javascript" language="javascript"
if (window.location.href.split('page/')[1] == 'your-pagename') {
x$('.xg_headline').css('display','none');}
/script
Now then, aren't you something?! Excellent David!

BTW, to add the left/right brackets, use & lt; and & gt; for less than and greater than. Remove the space after the &.

Here's a tutorial on the topic:
http://jensocial.com/group/ningnetworktips/forum/topics/how-to-add-...

Best,
Jen

David R and Jen,  I love you both!!   First of all, I can't say thank you enough to Jen for providing me with all these tips / hacks / wonderful works of awesomeness.  And David, thank you so much for your work.

 

I have created a little script that works with multiple pages:

<script type="text/javascript" language="javascript">
var pagelist = new Array('encryption-tool','retro-tool','image-editor','photo-editor','music-1','sesh-room');
for (aa=0;aa<pagelist.length; aa++){
if (window.location.href.split('page/')[1] == pagelist[aa]) {
x$('.xg_headline').css('display','none');}
}
</script>

 

As you can see, all you need to do is put all your pages you want to remove the headline from in the single array called pagelist.

 

Also, Jen, thank you sooooo much for your tools. I have incorporated pixlr tools into my network as well, I'm sure my members will love it.

 

I hope my script works well for any of you who may use it, it's working for me at the moment. Thank you again to David R for making this possible!

Edit: I can't get the & gt;  and & lt; to work for me :(

Very nice Jordan! Thanks for sharing.

Best to you, and thank you for the kind support, earlier this evening!

Jen

I have changed my script to handle URLS that contain more than just the page name.  As the code was written, the heading was still visible if the URL looked something like this http://isesh.com/page/conversion-tool?xg_source=facebook

 

This should take care of the remaining URL content.  The only drawback is page-name  and page-name2  would both have their headings removed, even if you only wanted it removed from page-name. I hope that makes sense.  Let me know if anybody has any problems with the script, cheers:

 

<script type="text/javascript" language="javascript">
var pagelist = new Array('encryption-tool','store-1','arcade-1','retro-tool','image-editor','photo-editor','music-1','sesh-room','wabble-dubstep','conversion-tool');
for (aa=0;aa<pagelist.length; aa++){
if (window.location.href.indexOf(pagelist[aa])!= -1) {
x$('.xg_headline').css('display','none');}
}
</script>

 

 

RSS

Members

© 2024   Created by JenSocial.   Powered by

Badges  |  Report an Issue  |  Terms of Service

Home
VIP Ning Tips