Motyw Modularity-Lite – support

Ponieważ świetny motyw WordPressa, który widzicie na tej stronie nie posiada właściwego, bezpłatnego forum pomocowego i ciężko znaleźć informacje jak poprawić błędy w podstawowym kodzie tej skóry postanowiłem na łamach tego właśnie bloga opisać jak rozwiązać niektóre problemy z motywem Modularity-Lite (English version below)

Zapraszam do lektury i zachęcam też do sugestii jeśli widzicie, że rozwiązałem jakiś problem, ale go tu nie opisałem:)

1. Obrazki mają float:left mimo wyśrodkowania

Zatem pierwszy problem dotyczy sposobu w jaki obrazki wyświetlają się w postach. Pomimo, iż ustawimy im wyśrodkowanie i w ekranie admin panel będą wyglądały OK, na samej stronie obrazki zawsze będą wyrównane do lewej a struktura tekstu będzie je opływać. Rozwiązanie jest mega proste i wielkie dzięki dla amistad18, który pomógł mi rozwiązać ten problem.

Odnajdujemy plik screen.css (tak, to nie literówka i to nie plik style.css, a screen.css w katalogu library/styles)  i znajdujemy linijkę:

p img {float:left; margin:1.5em 1.5em 1.5em 0;padding:0;}

a następnie usuwamy z niej fragment:

float:left;

i problem znika.

2. Czarne tło dla stron i komentarzy – jak się pozbyć?

Piszemy stronę, dodajemy formularz komentarzy i okazuje się,  że piękno tło motywu Modularity Lite jakie widzicie na tej stronie zamienia się w czarną pustkę. Jak sprawić, by w tle stron i komentarzy nie było czarnego pola, ale po prostu obrazek z tła? Rozwiązanie jest banalne !

Znajdujemy w style.css sekcję Comments i usuwamy fragment:

background: #000;

z zapisów:

h3#respond
h3#comments
#commentform

voila !

3. Tylko pierwszy post na stronie głównej wyświetla multimedia, następne już się nie pokazują – jak naprawić?

Piszemy posta, w którym mamy obrazek. Za chwilę piszemy drugiego posta, w którym też jest obrazek i nagle na stronie głównej obrazek z posta poprzedniego już się nie wyświetla. Modularity Lite ma jakąśblokadę i tylko pierwszy obrazek najnowszego posta jest wyświetlony na stronie głównej. Naprawienie tego jest bardzo łatwe:

Odnajdujemy plik apps/blog.php i fragment:

<?php if ($i == 1) {
include (THEMELIB . ‘/apps/multimedia.php’);
the_content();
}

zamieniamy na:

<?php if ($i >= 1) {
include (THEMELIB . ‘/apps/multimedia.php’);
the_content();
}

i problem rozwiązany.

4. Jak usunąć posty ze strony głównej (zobacz próbkę na stronie głównej portfolio)

Czasami może się zdarzyć, że nie będziemy chcieli wyświetlać żadnych postów na stronie głównej. By to ustawić, trzeba zedytować plik index.php i usunąć całą sekcję dotyczącą bloga a więc:

<!– Begin Blog –>
<?php include (THEMELIB . ‘/apps/blog.php’); ?>

5.  Jak zwiększyć ilość zdjęć wyświetlanych w pokazie slajdów na stronie głównej i jak zmienić je na swoje.

Wszystko co dotyczy pokazu slajdów znajduje się w odpowiednim katalogu – a więc w katalogu modularity-lite\images\slideshow mamy pliki image1.jpg …. image5.jpg i te właśnie pliki są wyświetlane. Żeby zamienić ja na swoje, trzeba po prostu zastąpić pliki imageX.jpg (gdzie X to numery od 1 do 5) swoimi plikami, pamiętając, że nazwy plików mają pozostać takie same. Pamiętajcie o rozmiarach obrazków – można je ustawić w opcjach motywu z poziomu panelu admina.

Natomiast jeśli chcemy wyświetlać w pokazie więcej niż 5 zdjęć, wtedy edytujemy plik slideshow-static.php i do fragmentu:

<ul id=”portfolio”>
<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image1.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>
<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image2.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>
<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image3.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>
<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image4.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>
<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image5.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>
</ul>

dopisujemy kolejną identyczną linijkę zmieniając tylko nazwę pliku na image6.jpg, image7.jpg … image1000.jpg

Powinno działać !

6. Zmiana szerokości obszaru postów kosztem sidebara

Za tą operację koleny raz odpowiedzialny będzie plik screen.css w katalogu library/styles.  Należy odszukać w nim linijki span-15 (odpowiada za szerokość obszaru postów) oraz span-8 (odpowiada za szerokość sidebar’a) i odpowiednio zmodyfikować ich wartości. Pamiętajcie jednak, że całość szerokości to 900px więc wartości jakie przypiszecie span-15 i span-8 muszą w sumie dać właśnie 900px (np span-15 na 750px i span-8 na 150px).

Proste, ale maksymalnie nieintuicyjne rozwiązanie.

7. Logo zamiast tytułu bloga

W lewym górnym rogu wyświetla się tytuł bloga. Jak zamienić go na własne logo?

W header.php odnajdujemy linijki:

<!– Begin Masthead –>
<div id=”masthead”>
<h4><a href=”<?php echo get_settings(‘home’); ?>/” title=”Home”><?php bloginfo(‘name’); ?></a> <span><?php bloginfo(‘description’); ?></span></h4>
</div>

i zmieniamy je na:

<!– Begin Masthead –>
<div id=”masthead”>
<h4 class=”left”><a href=”<?php echo get_settings(‘home’); ?>/” title=”Home”><img src=”PATH TO YOUR IMAGE” alt=”YOUR IMAGE ALT TEXT” /></a>
</h4>
</div>

gdzie PATH TO YOUR IMAGE to ścieżka dostępu do pliku logo np. modularity-lite\logo.jpg

Do tego w pliku style.css trzeba dodać następujące linijki (może być gdzieś na samym dole):

h4 img {
margin-top: 10px;
margin-left: -10px;
}

margin-top i margin-left to pozycja logo w widoku strony, jeśli logo powinno być niżej/wyżej czy bardziej z prawej – kombinujcie z tymi wartościami. Działa !

8. Komentarze nie wyświetlają się poprawnie

Bywa tak, że komentarze zostawione przez użytkowników nie wyświetlają się poprawnie, uciekajądo boku, zachodzą na siebie itd. Rozwiązać ten problem mogą:

w pliku style.css zamiana:

ol.commentlist li .comment-entry{margin: -135px 0 0;border-bottom: 5px solid #eee;padding: 5px 150px 0;line-height: 2em;}

na coś bardziej rozsądnego np.

ol.commentlist li .comment-entry{margin: 5px 0 0;border-bottom: 5px solid #eee;padding: 5px 150px 0;line-height: 2em;}

lub też po prostu włączenie wyświetlania avatarów jeśli jest wyłączone (ustawia się to w opcjach).

Powinno pomóc !

ENGLISH

Modularity-Lite is a great WordPress theme. You can actually see it on this blog. Unfortunately the free version of it means you have no support forum or support whatsoever from the theme’s developers side. It’s not that easy to find answers and fix bugs that are present in the theme’s code from the moment you download it. And that is why I decided I will post a few messages to show how I solved some of the problems I had while working on this blog.

Enjoy the reading and if you see I fixed something but I didn’t describe it here – let me know:)

1. Images are floating left despite being centered

The first problem I present here is about the way the images are displayed in posts.

Despite we set them as centered while uploading or editing them and despite they look OK in the admin panel once you post them they will all float left and all the text will float around them as well. The solution is really easy to implement, however was not easy to find. Thanks to amistad18 who helped me fix that (and many other problems)

We edit file screen.css (yes, it’s not a typo and that is not style.css file; you will find it in librabry/styles folder) and find line:

p img {float:left; margin:1.5em 1.5em 1.5em 0;padding:0;}

then just delete the following:

float:left;

and the problem disappears.

2. Black background for pages and comments – how to get rid of?

You post a page, or have a comments template and it turns out that the beautiful background that you can see on this website is replaced with just solid black. What to do to get rid of the black background and have the bakcground image there instead? Super easy solution!

In style.css find  Comments section and delete:

background: #000;

from:

h3#respond

h3#comments

#commentform

voila !

3. Only the first post on home page displays multimedia – how to fix it?

You write a post and add an image to it. Then you write another post with a second image in it, and it turns out the image from previous post is not visible anymore. Modularity Lite is somehow blocked and only first image of the latest post will display, the rest will not. Fixing this is easy.

Find apps/blog.php file and look for:

<?php if ($i == 1) {

include (THEMELIB . ‘/apps/multimedia.php’);

the_content();

}

then replace it with:

<?php if ($i >= 1) {

include (THEMELIB . ‘/apps/multimedia.php’);

the_content();

}

problem solved.

4. How to get rid of posts from homepage (see sample in my portfolio)

Sometimes we might need to get rid of posts from main page. To set it up simply edit  index.php file and delete the blog section which is:

<!– Begin Blog –>

<?php include (THEMELIB . ‘/apps/blog.php’); ?>

5. How to replace slideshow images with your own ones and how to increase the number of images displaying in the slideshow

Slideshow images are stored in modularity-lite\images\slideshow folder where you will find  image1.jpg …. image5.jpg files and these are the ones that will be displayed. To change the files to your own ones you need to simply replace them with your ones, remembering that the name imageX.jpg needs to remain the same and that the dimensions should match (you can change the size of slideshow images in the admin panel – theme options)

If you want to add more images to the slideshow then edit slideshow-static.php file adding to:

<ul id=”portfolio”>

<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image1.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>

<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image2.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>

<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image3.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>

<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image4.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>

<li><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/slideshow/image5.jpg” alt=”<?php bloginfo(‘name’); ?>” /></li>

</ul>

an exact same line changing only the imageX.jpg number to image6.jpg, image7.jpg … image1000.jpg – make sure you actually have those files in the images/slideshow folder.

Should work!

6. Change width of the post area / sidebar area

This operation should be performed in screen.css file in library/styles folder. You need to find lines  span-15 (responsible for post area width) and  span-8 (responsible for sidebar width) and modify their values accordingly. Please note the total width is 900px so the values you adjust for span-15 & span-8 need to add up to 900px (for example span-15 for 750px & span-8 for 150px).

Easy solution, almost impossible to find!

7. Custom logo instead of blog title

There’s a blog title displayed in the upper-left corner. How to change it to a custom logo?

In header.php find lines:

<!– Begin Masthead –>

<div id=”masthead”>

<h4><a href=”<?php echo get_settings(‘home’); ?>/” title=”Home”><?php bloginfo(‘name’); ?></a> <span><?php bloginfo(‘description’); ?></span></h4>

</div>

and replace them with:

<!– Begin Masthead –>

<div id=”masthead”>

<h4 class=”left”><a href=”<?php echo get_settings(‘home’); ?>/” title=”Home”><img src=”PATH TO YOUR IMAGE” alt=”YOUR IMAGE ALT TEXT” /></a>

</h4>

</div>

where PATH TO YOUR IMAGE is the path to your image for example modularity-lite\logo.jpg

Then, in style.css file add the following code (wherever you like):

h4 img {

margin-top: 10px;

margin-left: -10px;

}

margin-top & margin-left position the logo so if you need it lower/higher just play with these numbers. It works !

8. Comments are not displaying properly

It happens that the comments are not displaying properly, they float left, they are placed one on another and basically – they are all messed up. To solve it try either:

edit style.css and replace:

ol.commentlist li .comment-entry{margin: -135px 0 0;border-bottom: 5px solid #eee;padding: 5px 150px 0;line-height: 2em;}

to something more reasonable, like:

ol.commentlist li .comment-entry{margin: 5px 0 0;border-bottom: 5px solid #eee;padding: 5px 150px 0;line-height: 2em;}

or simply turn ON the avatar display in options. If avatars are disabled, comments get messy.

Should help!


Facebook'owe komentarze:

Autor: Dariusz Czepiel

23 komentarzy

Hey Darius, I did exactly what you said for custom logo but when i put it on everytime you clicked it (even with me putting it the link the homepage) it always said Whoops Page Not Found.

Where exactly do you upload the image up to on the database and the exact wording on where it is installed in the database.

Also do you know where to change the background image?? I use the same theme as you but would like to get rid of the brown thing going on.

Cheers mate, all the best.

Jim.

Jim,

php echo get_settings(‘home’)

the above code (can’t put the full code in a comment so you need to look it up in the post) is responsible for taking you ‘home’ once you click the image. The image can be stored anywhere you want, I have mine in http://dariuszczepiel.pl/folder/logo.png

Not sure why it is not working for you.

For backgroud image – just find file bg.jpg in your modularity-lite files and replace it with an image you’d like to have as background. Styling of it is probably in your style.css file.

Cheers :)

first,
i really love your wedding photos! very original
second. thanks so much for posting this, i have been looking for help for a while

third, i want to create several drop down menus each with pages different listed. i followed your posts to change the title of the drop down menu, however when i first entered the code the two drop down menus(called outdoor and indoor) listed indentical pages. How to i make each menu correspond to different pages? and how would i make sure new pages went under the correct menu?

also is it possible for each page to have its own individual image? I want to shut down the slideshow and show a different picture on each page.

This is great information – thank you!!!

I’m trying to get rid of the black background entirely. I’ve tried customizing it under the themes area but it’s not changing…even when I type in all zeros.

Any ideas why? I’m working on a mac – does that matter?

This stuff can be maddening. Thanks!
Marla

Audrey

Hello,

I am having some problems with this theme, hope you can help.

First of all, I can’t find a place to upload any slideshow images for my home page.

In your blog entry you said “Slideshow images are stored in modularity-lite\images\slideshow folder…” but I can’t find where that folder is.

I’ve tried a FTP client like Filezilla but apparently it only works on WordPress.org and not WordPress.com

Oh, by the way I did not download this theme, I just straight installed it from the WordPress.com website…does that make any difference?

All, please remember I am no WordPress designer and everything you read above I asked and got answers to somewhere on the web.

Lisa,
to have each menu correspond with different pages you need to edit nav.php and add include/exclude to the code.
Please see this link for details:
http://codex.wordpress.org/Function_Reference/wp_list_pages#Include_Pages_in_List

Marla,
I am not sure which black background you are trying to get rid of. I only got rid of the black background from pages and comments like I described in #2. Not sure if I can help. You can always put a new bg.jpg file in the theme’s folder that would be a picture you design.

Audrey,
You cannot access the site via FTP if you are using wordpress.com hosting. This was the main reason why I let wordpress.com go.

yes, you may not be a web designer, you are one of the only people who answers questions promptly. I really appreciate your help.

Just to help others, I will add an answer that i struggled with

Changing drop down menus and adding pages

the wordpress coding (mentioned above)will tell you to include/exclude pages so that different menus list different pages. they give you this include code:

<?php wp_list_pages('include=7,13,26,35&title_li=’ . __(‘Pages’) . ” ); ?>

with this code the word “pages” in your drop down menus. If you want it removed. Use this code instead:

hope this is useful

hmmm clearly cut and paste is not working.

the code is

replace your page id numbers, with the numbers that correspond to the pages separated by commas, eg: 33,6,7,19,26,

worked for me!

HI:

I have a problem. All my archives files show no picture , just the text.
anyone can help plese

Thanks
Erick

how did you get the nav bar to drop down on a hover? in the default setting of modularity lite it makes you have to click to view the sub links.

also, do you know of any way to change the color in the boxes of the nav bar to not be that blue?

i’ve been searching for a while now and cant figure that one out.

any help is much appreciated

figured out the color, still nothing on the hover.

the color of the arrow can be photoshoped easily just download the

/wp-content/themes/modularity-lite/images/arrow.png

then make the three stages whatever color you’d like.

NEED TO figure out the hover issue though.

Thanks
James

Erwin

Hi,

I change the span-15 and span8 and no changes on the page.
Look like not doing any changes.

Please help. Want to add a menu on the right part of the content.

Erick:

I have no clue on the archives.

Jamesrknapp:
The hover thing was something I paid for and I am not even sure what was done to make it roll out on hover. I’d be happy to help but don’t even know in which file to look.

Erwin:
Don’t know why it doesn’t work… do you have 2 columns set up? It worked for me…

HELP!

I am trying to move my blog header to get aligned with my image slideshow box… I tried the:
#masthead h4 img {margin-top: 100px;margin-left: -150px;}

in the style css (anywhere and everywhere!) and it’s not working!

It’s driving me mental… can you please help!

(ps. thanks for your help with all the other stuff!)

Im trying to change the photos that are used for the main page slideshow. It looks like the slideshow chooses pictures randomly. Can I select specific images instead? thanks!

Your comments helped me so much! I just have one last question, how do I make the qTranslate to work? I couldn’t find anything on the support forum. I’d like to make my qTranslator just like yours! Tks!

Witam,

właśnie tworze swoją podróżniczą stronę w wordpress, również wybrałam modularity – lite :)
Bardzo podoba mi się Twoja galeria. Czy mógłbyś podać wskazówki jak stworzyć podobną?
Z góry zaznaczam że jestem początkującą “wordpressowiczką”

Dziękuję
Ola

botto – wielkość zdjęć slideshow zawsze jest 900px możesz edytować jaka ma być wysokość w theme options w panelu admina. Zdjecia ktore podmieniasz musza byc takich rozmiarow jak ustawiles w theme options wlasnie.

lisa – I have no clue how to fix it, post on some general wordpress forum for help.

Nicole – it chooses the slideshow pictures by name from the folder I specified in #5

Alessandro – qTranslate was a tough part (the language chooser) – you can check my source code for the navigation menu to see how it was coded. For other problems visit the qTranslate support forum – plenty of help there.

Ola – galeria taka jak w portfolio? Generalnie dlugo by pisac jak zrobic dokladnie cos takiego, ale powiem Ci, ze to wtyczka NextGen Gallery – zainstaluj sobie i potestuj – ma dużo możliwości i na pewno dopasujesz do swoich potrzeb.

chciałabym spytać o jeszcze jedną rzecz którą masz na swojej stronie.
Chciałabym dodać w menu jeszcze jedną zakładkę, która odnosiłaby do niezmienialnej strony ze zdjęciem i krótkim opisem. Nie potrafię znaleźć w opcjach funkcji, która pozwalałaby na dodanie czegoś w menu. Proszę o pomoc, widziałam że masz u siebie rozwinięte menu.

Dziękuję
Ola

Witam,

na początek dziękuję za pierwsze polskie wsparcie techniczne dla tego stylu – wszystkie pozostałe artykuły są w języku angielskim i zazwyczaj nie wyczerpują tematu lub krążą naokoło problemu i nie dotykają sedna sprawy.

Od dłuższego czasu walczę z dodaniem do pokazu slajdów na stronie głównej półprzeźroczystego pola tekstowego (na około 1/4 szerokości zdjęcia) z opisem i jednocześnie podświetlanym linkiem do artykułu oraz przyciskami nawigacyjnymi po kolejnych zdjęciach. Jak np. tu: http://www.prophotoblogs.com/ lub chociażby tu: http://www.tvn24.pl/

czy może Pan coś podpowiedzieć?

pozdrawiam serdecznie

M.

Michale, nie wiem niestety, to zbyt zaawansowane jak dla mnie :)

Hi there would you mind stating which blog platform you’re using? I’m planning to start my own blog soon but I’m having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique. P.S Apologies for getting off-topic but I had to ask!

[...] nową wersję bloga. Planowałem wielkie przenosiny na pierwsze dni kwietnia – niestety problemy na jakie trafiłem dopasowując ten blog do swoich potrzeb sprawiły, że musiałem datę premiery wielokrotnie [...]

Twój e-mail nie jest widoczny ani publikowany. Wymagane pola oznaczone *

*

*

Nie udało się wysłać komentarza. Spróbuj ponownie.

O   s t r o n i e
N o w o ś c i