ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Trying To Adjust My Blog Template- Can anyone help with code?

(1/2) > >>

Erika305:
Hi!

I am trying to adjust my blog template.

I was up for HOURS trying to see if I could figure out how to tweak this code to allow for 14 categories(labels) for this blog template but I couldn't do it. You know how you label each post to categorize it.

If you look at this template, in the picture you'll see how it is soo awesome and lists the content by category with the latest posts automatically generating at the top for each category (label). Its awesome and it works but it only allows for 4 categories and I need 14-16 to showcase all different types of content. [ Invalid Attachment ]

Do you have any suggestions for how to duplicate this code to make it what I need? I attached the Template with the XML extension as well as a JPEG of the way the template looks when loaded. You will find the "array" is the name of each category in the html code part. Some of it may be in Portugese because that is where the coder is from.


Haha! I feel so smart talking HTML with you! LOL

rgdot:
This defines the four


--- Code: Javascript ---var contarlabels = 0;labelname = new Array("Beauty","Gastronomy","Fashion","Lorem");labeltitle = new Array("Beauty","Gastronomy","Fashion","Lorem");
and this cycles through


--- Code: Javascript ---salida += '<div class="featured">';salida += '<h3>' + labeltitle[contarlabels] + '</h3>';salida += salidainner;salida += '<b><a href="http://femininamagazine-btemplates.blogspot.com/search/label/' + labelname[contarlabels] + '?max-results=10">More '+ labelname[contarlabels] +'</a></b>';salida += '</div>';document.write(salida);contarlabels ++;}
The array has 4 values. Other categories names can be added to the array.

I am NOT a programmer but have some idea...

Erika305:
Thanks. I tried to just- add more labels- but when I loaded the template it only displayed the last four labels.

I am not sure how you are suggesting with the 2nd pic you included, that I can change the number of arrays. How do I do that?

But thanks so much for even looking at it for me!

rgdot:
No problem. If I can't one of the real programmers will  :D



Erika305:
Are you saying that the 2nd code you posted is the adjustment I need to create more arrays?

Navigation

[0] Message Index

[#] Next page

Go to full version