k-9
(k-9)
25 Styczeń 2014 15:01
#1
Cześć,
Jestem posiadaczem szablonu SCRN do WP. Szablon spełnia wszystkie moje oczekiwania, ale brakuje mi brak możliwości wgrania swojego loga…
Szablon wygląda tak:
http://themeforest.net/item/scrn-responsive-one-page-single-page-portfolio/2964855
Czy ktoś mógłby mnie pokierować gdzie dodać kod który umożliwiłby dodanie loga? Najlepiej w miejscu po lewej stronie na pasku Menu.
Niestety jestem dość początkujący… i ciężko mi samemu ogarnąć kody
luckiblue
(luckiblue)
25 Styczeń 2014 16:06
#2
W kodzie strony html masz znacznik <nav> a w nim <ul> dodaj pomiędzy nie odnośnik do loga, z odpowiednimi atrybutami np. klasą, id, stylem.
k-9
(k-9)
25 Styczeń 2014 17:26
#3
Tylko, że mi chodzi o dodanie grafiki… (najlepiej z odnośnikiem do strony głównej), a ty piszesz (tak zrozumiełem) że dodanie loga w sensie sam tekst…
luckiblue
(luckiblue)
25 Styczeń 2014 20:51
#4
Nie, chodzi mi o to, że pomiędzy te znaczniki wstawisz element listy w postaci obrazka o odpowiedniej wysokości i szerokości, który będzie odsyłaczem do strony głównej.
<nav>
<ul id="logo">
<li id="main"><a href="strona_glowna.html"><img src="sciezka_do_loga.jpg" /></a></li>
</ul>
<ul>
</ul>
</nav>
k-9
(k-9)
26 Styczeń 2014 13:42
#5
Czaje na 60%.
Ale dodać to w:
style.css
page.php
page-full.php
Czy gdzie?
Czy po prostu dopisać do w edytorze w WP?
===
Jeszcze mam 2 pytania… Jak myślisz jakie wymiary powinno mieć logo? Szczerze mówić nic mi nie przychodzi do głowy… Proporcje samego loga to jest normlany prostokąt… Może 120x220?
Chciałbym spolszczyć formularz kontaktowy (name, message) i CONTACT INFO
Patrzyłem u siebie firebugiem gdzie ten kod się znajduje, ale niczego tam nie widzę… Może dlatego, że jest to szablon responsywny…
rioderix
(Rioderix)
26 Styczeń 2014 14:17
#6
Po prostu dodajesz go do HTML bo robisz to w HTML czy w WP ?
k-9
(k-9)
26 Styczeń 2014 15:24
#7
Robie w WP
Ale gdzie mam dodać ten kod?? o_0
luckiblue
(luckiblue)
26 Styczeń 2014 19:45
#8
Wysokość loga to 40px (jeśli chcesz zachować wysokość paska gdzie jest menu, inaczej będzie on po prostu grubszy), długość jaką chcesz. Możesz to ustawić za pomocą atrybutów w html albo w edytorze grafiki.
Kod musisz dodać do pliku gdzie masz zapisane menu czyli albo page.php albo page-full.php, chyba że masz jeszcze inne podstrony to podaj nazwy albo sam poszukaj gdzie masz zapisane menu czyli gdzie jest taki kod:
<nav>
<ul id="menu-top-menu" class="menu"><li id="menu-item-825" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home"><a href="http://teothemes.com/wp/scrn/#intro">Home</a></li>
<li id="menu-item-724" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://teothemes.com/wp/scrn/#work">Work</a></li>
<li id="menu-item-726" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://teothemes.com/wp/scrn/#nam-fermentum-suscipit-metus-at">Services</a></li>
<li id="menu-item-725" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children"><a href="http://teothemes.com/wp/scrn/#abou">About</a>
<ul class="sub-menu">
<li id="menu-item-828" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://teothemes.com/wp/scrn/#abou">About</a></li>
</ul>
k-9
(k-9)
28 Styczeń 2014 16:44
#9
Przejrzałem główne pliki które ma szablon:
luckiblue
(luckiblue)
28 Styczeń 2014 19:55
#10
Tylko pliki z zakończeniem .php i .html wchodzą w grę. Może to być faktycznie inaczej zapisane w php ale gdzieś muszą być do znalezienia przynajmniej same wyrazy “Contact”, “Name”, “Mail” itd. Ja stawiałbym, że są w index / page-full / page.
k-9
(k-9)
29 Styczeń 2014 11:32
#11
Z tego co widze tylko w pliku index. jest fraza menu…
Próbowałęm dodac ta linike co mi podałes wyżej, ale niestety rozwaliłęm sobie stronę xD (dobrze, że zrobiłęm kopie zapsowe)
Tutaj jest mój plik index
<?php
global $scrn;
if(isset($_POST['submit']))
{
if( !$_POST['name'] || !$_POST['email'] || !$_POST['comment'] || $_POST['name'] == '' || $_POST['email'] == ''|| $_POST['comment'] == '')
{
$error = 'Please fill in all the required fields';
}
else
{
$absolute_path = __FILE__ ;
$path_to_file = explode( 'wp-content', $absolute_path );
$path_to_wp = $path_to_file[0];
// Access WordPress
require_once( $path_to_wp . '/wp-load.php' );
$scrn = get_option('scrn');
$name = esc_html($_POST['name']);
$email = esc_html($_POST['email']);
$comment = esc_html($_POST['comment']);
$msg = esc_attr('Name: ', 'SCRN') . $name . PHP_EOL;
$msg .= esc_attr('E-mail: ', 'SCRN') . $email . PHP_EOL;
$msg .= esc_attr('Message: ', 'SCRN') . $comment;
$to = $scrn['email'];
$sitename = get_bloginfo('name');
$subject = '[' . $sitename . ']' . ' New Message';
$headers = 'From: ' . $name . ' <' . $email . '>' . PHP_EOL;
wp_mail($to, $subject, $msg, $headers);
}
}
get_header(); ?>
<?php
if ( ( $locations = get_nav_menu_locations() ) && $locations['top-menu'] ) {
$menu = wp_get_nav_menu_object( $locations['top-menu'] );
$menu_items = wp_get_nav_menu_items($menu->term_id);
$include = array();
foreach($menu_items as $item) {
if($item->object == 'page')
$include[] = $item->object_id;
}
query_posts( array( 'post_type' => 'page', 'post__in' => $include, 'posts_per_page' => count($include), 'orderby' => 'post__in' ) );
}
else
{
if(isset($scrn['pages_topmenu']) && $scrn['pages_topmenu'] != '' )
query_posts(array( 'post_type' => 'page', 'post__in' => $scrn['pages_topmenu'], 'posts_per_page' => count($scrn['pages_topmenu']), 'orderby' => 'menu_order', 'order' => 'ASC' ) );
else
query_posts(array( 'post_type' => 'page', 'posts_per_page' => 4, 'orderby' => 'menu_order', 'order' => 'ASC' ) );
}
$i = 1;
while(have_posts() ) : the_post(); ?>
<?php $temp = get_post_meta($post->ID, 'vp_settings', true);?>
<div class="bg <?php if(isset($temp['variation']) && $temp['variation'] == 2) echo 'dark-bg';?>" id="<?php echo $post->post_name;?>"
<?php if(isset($temp['variation']) && $temp['variation'] == 3) { echo 'style="';
if(isset($temp['background_color']) && $temp['background_color'] != '') echo 'background-color: #' . $temp['background_color'];
else if(isset($temp['background']) && $temp['background'] != '') echo 'background-image: url(\'' . $temp['background'] . '\')'; echo '"'; } ?>>
<div class="container">
<div class="sixteen columns">
<h2>
<span class="lines">
<?php $top_title = get_post_meta($post->ID, 'top_title', true);
if($top_title != '') echo $top_title; else the_title();?>
</span>
</h2>
</div> <!-- end sixteen columns -->
<div class="clear"></div>
<?php global $more; $more = 0; the_content('');?>
</div> <!-- end container -->
</div> <!-- end bg -->
<div id="separator_<?php echo $i;?>" class="separator1">
<div class="bg<?php echo ($i+1); echo ' bg';?>" style="<?php if(isset($temp['slogan_bg']) && $temp['slogan_bg'] != '') echo 'background-image: url(\'' . $temp['slogan_bg'] . '\')';?> "></div>
<p class="separator"><?php if(isset($temp['slogan']) && $temp['slogan'] != '') echo $temp['slogan'];?></p>
</div>
<?php $i++; endwhile; wp_reset_query(); ?>
<div id="contact" class="dark-bg">
<div class="container">
<div class="sixteen columns">
<h2 class="white"><span class="lines"><?php _e('Kontakt', 'Windowsbright');?></span></h2>
</div> <!-- end sixteen columns -->
<?php if(isset($scrn['contact_description']) && $scrn['contact_description'] != '') { ?>
<div class="sixteen columns">
<p><?php echo esc_attr($scrn['contact_description']);?></p>
</div> <!-- end sixteen columns -->
<?php } ?>
<div class="clear"></div>
<div class="eight columns">
<div class="contact-form">
<div class="done">
<?php _e('<b>Dziękuje!</b> Otrzymałem Twoją wiadomość. Wkrótce się z Tobą skontaktuje', 'Windowsbright');?>
</div>
<form method="post" action="process.php">
<p><?php _e('Imię i nazwisko', 'SCRN');?></p>
<input type="treść" Imię i nazwisko="Imie i nazwisko" class="treść" />
<p><?php _e('Email', 'SCRN');?></p>
<input type="treść" name="Email" class="treść" id="Email" />
<p><?php _e('Wiadomość', 'SCRN');?></p>
<textarea name="Wiadomość" class="treść"></textarea>
<input type="submit" id="submit" value="<?php _e('Wyślij', 'SCRN');?>" class="submit-button" />
</form>
</div> <!-- end contact-form -->
</div> <!-- end eight columns -->
<div class="eight columns">
<div class="contact-info">
<h5><?php _e('Bądźmy w kontakcie', 'SCRN');?></h5>
<?php if(isset($scrn['phone']) && $scrn['phone'] != '') { ?><p class="white"><img src="<?php echo get_template_directory_uri();?>/images/icn-phone.png" alt="" /> <?php echo $scrn['phone'];?></p><?php } ?>
<?php if(isset($scrn['email']) && $scrn['email'] != '') { ?><p class="white"><img src="<?php echo get_template_directory_uri();?>/images/icn-email.png" alt="" /> <a href="mailto:<?php echo $scrn['email'];?>"><?php echo encEmail($scrn['email']);?></a></p><?php } ?>
<?php if(isset($scrn['location']) && $scrn['location'] != '') { ?><p class="white"><img src="<?php echo get_template_directory_uri();?>/images/icn-address.png" alt="" /> <?php echo $scrn['location'];?></p><?php } ?>
</div> <!-- end contact-info -->
<div class="social">
<ul>
<?php if(isset($scrn['twitter_username']) && $scrn['twitter_username'] != '') { ?><li><a href="http://twitter.com/<?php echo $scrn['twitter_username'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-twitter2.png" alt="Twitter icon" /></a></li><?php } ?>
<?php if(isset($scrn['facebook_url']) && $scrn['facebook_url'] != '') { ?><li><a href="<?php echo $scrn['facebook_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-facebook2.png" alt="Facebook icon" /></a></li><?php } ?>
<?php if(isset($scrn['gplus_url']) && $scrn['gplus_url'] != '') { ?><li><a href="<?php echo $scrn['gplus_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-gplus.png" alt="Google+ icon" /></a></li><?php } ?>
<?php if(isset($scrn['linkedin_url']) && $scrn['linkedin_url'] != '') { ?><li><a href="<?php echo $scrn['linkedin_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-linkedin.png" alt="LinkedIn icon" /></a></li><?php } ?>
<?php if(isset($scrn['forrst_url']) && $scrn['forrst_url'] != '') { ?><li><a href="<?php echo $scrn['forrst_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-forrst.png" alt="Forrst icon" /></a></li><?php } ?>
<?php if(isset($scrn['skype_url']) && $scrn['skype_url'] != '') { ?><li><a href="<?php echo $scrn['skype_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-skype.png" alt="Skype icon" /></a></li><?php } ?>
<?php if(isset($scrn['dribbble_url']) && $scrn['dribbble_url'] != '') { ?><li><a href="<?php echo $scrn['dribbble_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-dribbble.png" alt="Dribbble icon" /></a></li><?php } ?>
<?php if(isset($scrn['pinterest_url']) && $scrn['pinterest_url'] != '') { ?><li><a href="<?php echo $scrn['pinterest_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-pinterest.png" alt="Pinterest icon" /></a></li><?php } ?>
<?php if(isset($scrn['vimeo_url']) && $scrn['vimeo_url'] != '') { ?><li><a href="<?php echo $scrn['vimeo_url'];?>"><img src="<?php echo get_template_directory_uri();?>/images/icn-vimeo.png" alt="Vimeo icon" /></a></li><?php } ?>
</ul>
</div> <!-- end social -->
</div> <!-- end eight columns -->
<div class="clear"></div>
<div class="sixteen columns">
<div class="copyright">
<p>© <?php the_time("Y");?> <?php _e('All Rights Reserved', 'SCRN');?>, <?php _e('designed by ', 'SCRN');?> <a href="http://teothemes.com">TeoThemes</a></p>
</div>
</div>
</div> <!-- end container -->
</div> <!-- end contact -->
<?php get_footer();?>
k-9
(k-9)
30 Styczeń 2014 17:00
#12
No nic… próbuje też rozgryź jak zrobić filtrowane portfolio… W instrukcji mam takie coś
11) Portfolio:
[portfolio"]
[portfolio_item columns="4" thumbnail="THUMB URL" image="FULL IMAGE URL" title="TITLE HERE" text="SOME TEXT."]
[/portfolio_item]
[portfolio_item columns="4" thumbnail="THUMB URL" image="FULL IMAGE URL" title="TITLE HERE" text="SOME TEXT."]
[/portfolio_item]
[portfolio_item columns="4" thumbnail="THUMB URL" image="FULL IMAGE URL" title="TITLE HERE" text="SOME TEXT."]
[/portfolio_item]
[portfolio_item columns="4" thumbnail="THUMB URL" image="FULL IMAGE URL" title="TITLE HERE" text="SOME TEXT."]
[/portfolio_item]
[/portfolio]
12) Filterable portfolio:
The difference between the filterable portfolio and the normal one is that on the filterable one you’ll need to create a post for each item in your portfolio, allowing you to have more detailed info on each item, like a slider of images, a more detailed explanation + the ability of categorizing and filtering the whole portfolio.
The attributes for the [filterable_portfolio] shortcode are categories and number . The categories is a list with the ids of the categories included, it should contain only category ids separated by commas, so a possible input would be 1, 2, 3, 4, 12, 15 to include the categories with the ids 1, 2, 3, 4, 12 and 15. To get the id of a category, go to the dashboard > Posts > Categories and when you’ll hover on any category name, the link should show up somewhere at the bottom of the browser. Here’s a screenshot of a category with the id 4, it’s the only number in that URL.
=============
Z zrobieniem normalnego portfolio 11) nie mam problemów. Wszystko działa jak należy. Ale nie mogę ogarnąć filtrowanego… Zrobiłem kategorie i dalej już się zgubiłem…
k-9
(k-9)
1 Luty 2014 14:57
#13
Niestety, ale mam kolejny problem z szablonem… W ustawaniach szablonu po wpisaniu adresu email tereotycznie wszystkie wiadomości napisane na formularzu powinny automatycznie docierać na skrzynkę pocztową… Sprawdziłem to i niestety żadna wiadomość do mnie nie trafiła…
Pomoże ktoś?