go41

Re: Random Post :: Reply by Joern

von Joern am 7. Mai. 2011 | Keine Kommentare

right, this part in header.php generates the category bar in index, archive or post, whatever you select.
Important here is $postcat = get_settings( "ar_categories" )
means the theme get’s the categories from the options settings in your dashboard.
The admin menu you see in dashboard you find as code in functions.php
In this options panel under ‚General Settings‘ you can select multiple categories to be displayed, it says: ‚You must select 5 categories to get the best layout.‘
Do this: Select 10 categories and I believe you will see a double category bar. The categories line up in a way as the images in your featured (random) section.
BUT: in functions.php I see you also can set the colours for the categories in the category bar. Here under ‚Category Color Assignment‘ you are limited to 5 categories only, I do not know which colour the categories 6 to 10 will show in the second row.
It might be possible (I would try) to duplicate these entries in functions.php to get the choice of colour for ten categories?!
This is the end of the part I talk about:

cp_select( "cp_colorCategory_5", $cp_Colorcat, get_settings( "cp_colorCategory_5" ), "" );
cp_input( "cp_hexColor_5", "smalltext", "Web Hex Color only (start with #)", get_settings( "cp_hexColor_5" ) );
cp_cth();
for each more setting you have to add two lines, I show you only for category no.6 how I think it should look like:

cp_select( "cp_colorCategory_5", $cp_Colorcat, get_settings( "cp_colorCategory_5" ), "" );
cp_input( "cp_hexColor_5", "smalltext", "Web Hex Color only (start with #)", get_settings( "cp_hexColor_5" ) );

cp_select( "cp_colorCategory_6", $cp_Colorcat, get_settings( "cp_colorCategory_6" ), "" ); // added new
cp_input( "cp_hexColor_6", "smalltext", "Web Hex Color only (start with #)", get_settings( "cp_hexColor_6" ) ); // added new
cp_cth();
BACKUP the ORIGINAL before CHANGING!!!
____________________
you find me on Google+, Twitter and Facebook

(von: Joern)

Hier noch 9 weitere Ergebnisse dieses Threads:

Random Post

5. Mai. 2011 (von: saber210)

Hello Joern,I need your help.. I just found out this code on arthemia premium and it works well on arthemia free..I just want to customize it a little more.. I tried to edit the code all by myself but I…

Re: Random Post :: Reply by Joern

5. Mai. 2011 (von: Joern)

can't see it on your site in the moment.First I would try to set in this line:Code:$randompost = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY RAND() LIMIT 12");the LIMIT to 18Code:$randompost = $wpdb->get_results("SELECT…

Re: Random Post :: Reply by Joern

5. Mai. 2011 (von: Joern)

Oh, I think you have the random posts in the featured section?One hint, uncomment in style.css near line 390 the position: absolute; and left: 780px;like this:#featured { float: right; font-size: 12px;/* left: 780px; */ padding: 5px 5px 0 1... Weiterlesen…

Re: Random Post :: Reply by saber210

6. Mai. 2011 (von: saber210)

Thanks Joern, I got it working now..I just want to ask about absolute position.. Will this work on any screen resolution? I dont want it to overlap when view on other screen resolutions..And one other thing, the limit on sql…

Re: Random Post :: Reply by Joern

6. Mai. 2011 (von: Joern)

about the position: the div is anyway positioned inside the div around, here div id="top"this has nothing to do with screen resolution as top is 930px wide in all cases and featured takes 320px aligned to the right (float:right) in…

Re: Random Post :: Reply by saber210

7. Mai. 2011 (von: saber210)

Thanks Joern,But the code seems dont work.. I tried it once and no random post showed up..Another thing, I want to remove the thumbnail on single post and replace it with whole picture? is that possible? Weiterlesen →

Re: Random Post :: Reply by Joern

7. Mai. 2011 (von: Joern)

In your Arthemia Premium Dashboard you should have a page for theme options.Find 'Single Post Page Settings' and set here the thumbnail size to a bigger value like 550px wide and 550px highAnother way is to select the option not…

Re: Random Post :: Reply by saber210

7. Mai. 2011 (von: saber210)

Thanks admin.. how about doubling the category bar? In arthemia free it is very easy but in arthemia premium i think it is hard..Code:<?php $showcatbar1 = get_settings ( "cp_showpostcatbar" );            $showcatbar2 = get_settings ( "cp_showarchivecatbar"…

Re: Random Post :: Reply by saber210

8. Mai. 2011 (von: saber210)

Thanks admin.. but it doesnt work..EDIT: i found a solution on this line Code:$postcat = array_slice($postcat, 0, 5);sort($postcat);I just change 5 to 10 and it works..Thanks again admin! Weiterlesen →

Autor:

Du findest mich auch auf Google+, Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


weitere forum Beiträge: