Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Jak ukryć kawałek kodu ?
kps
post 18.09.2010, 10:21:40
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


Witam,

Robię stronkę opartą na Wordpressie,
Chciałbym żeby nie wyglądała ona na WP tak więc chce ukryć:

Tytuł posta, datę, przez kogo dodany itp. czyli taką belkę nad każdym postem,
chce aby wyświetlało tylko treść posta.

Czy można to jakoś prosto zrobić ? Żeby skrypt sobie tam działał a żeby
go nie pokazywało.

Znalazłem już linie w kodzie odpowiadające za to, tylko nie wiem jak zrobić
żeby to działało a nie było tego widać.

To chyba ten kawałek:

CODE
<!-- post -->
<div id="post-<?php the_ID(); ?>" <?php if (function_exists("post_class")) post_class(); else print 'class="post"'; ?>>
<?php if (!get_post_meta($post->ID, 'hide_title', true)): ?><h2><?php the_title(); ?></h2><?php endif; ?>

<div class="post-content clearfix">
<?php the_content(__('Read the rest of this entry &raquo;', 'arclite')); ?>
</div>
<?php wp_link_pages(array('before' => '<p><strong>Pages: </strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<?php
$posttags = get_the_tags();
if ($posttags) { ?>
<p class="tags"> <?php the_tags(__('Tags:','arclite').' ', ', ', ''); ?></p>
<div class="clear"></div>
<?php } ?>
<p class="post-metadata">
<?php
printf(__('This entry was posted on %s and is filed under %s. You can follow any responses to this entry through %s.', 'arclite'), get_the_time(__('l, F jS, Y','arclite')), get_the_category_list(', '), '<a href="'.get_post_comments_feed_link($post->ID).'" title="RSS 2.0">RSS 2.0</a>'); ?>

<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
// Both Comments and Pings are open
printf(__('You can <a href="#respond">leave a response</a>, or <a href="%s" rel="trackback">trackback</a> from your own site.', 'arclite'), trackback_url('',false));

} elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
// Only Pings are Open
printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.', 'arclite'), trackback_url('',false));

} elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
// Comments are open, Pings are not
_e('You can skip to the end and leave a response. Pinging is currently not allowed.','arclite');

} elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
// Neither Comments, nor Pings are open
_e('Both comments and pings are currently closed.','arclite');
} ?>
<?php edit_post_link(__('Edit this entry', 'arclite')); ?>
</p>

</div>
<!-- /post -->




Pozdrawiam
i z góry dziękuję za pomoc



--------------------
Krzysztofperkowski.pl
Go to the top of the page
+Quote Post
teherty
post 18.09.2010, 10:32:38
Post #2





Grupa: Zarejestrowani
Postów: 15
Pomógł: 4
Dołączył: 17.05.2009

Ostrzeżenie: (0%)
-----


Chyba jednak to nie ten kawałek kodu. Po prostu edytuj styl którego używasz, tam powinny być przywoływane zmienne, lub jakieś tam funkcje które same przez się zdołasz zrozumieć i umieścić w komentarzu (lepiej nie usuwaj, bo mogą się jeszcze kiedyś przydać).


--------------------
Go to the top of the page
+Quote Post
kps
post 18.09.2010, 11:19:22
Post #3





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


tak stylu już nie ma ale,

"
Witaj Świecie

wrz 17

Posted by admin in Bez kategorii | 1 Comment | Edit "

Dalej zostało smile.gif

Ten post edytował kps 18.09.2010, 11:21:04


--------------------
Krzysztofperkowski.pl
Go to the top of the page
+Quote Post
Daiquiri
post 18.09.2010, 11:56:28
Post #4





Grupa: Administratorzy
Postów: 1 552
Pomógł: 211
Dołączył: 7.07.2009
Skąd: NJ




Usuń wyświetlanie tych danych z każdej części skórki (index.php, page.php itd.).
Go to the top of the page
+Quote Post
goran
post 18.09.2010, 22:00:28
Post #5





Grupa: Zarejestrowani
Postów: 23
Pomógł: 2
Dołączył: 17.09.2010

Ostrzeżenie: (0%)
-----


A odpowiadając na Twoje pytanie, jeżeli tylko nie chcesz, żeby te częsci HTML się wyświetlały to je po prostu obejmij w klamry komentarza tj.:

  1. <!-- TU KOD KTÓRY MA SIĘ NIE WYŚWIETLAĆ -->


Ten post edytował goran 18.09.2010, 22:00:55
Go to the top of the page
+Quote Post
Daiquiri
post 19.09.2010, 08:06:05
Post #6





Grupa: Administratorzy
Postów: 1 552
Pomógł: 211
Dołączył: 7.07.2009
Skąd: NJ




@goran - Ty tak na poważnie?
Go to the top of the page
+Quote Post
kps
post 19.09.2010, 10:37:27
Post #7





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 14.09.2009

Ostrzeżenie: (0%)
-----


Daiquiri jak usunąć wyświetlanie tych danych, coś wyciąć z kodu, nie jestem za dobry z php.

Popróbowałem tak jak mówił goran i nawet jakoś działa


--------------------
Krzysztofperkowski.pl
Go to the top of the page
+Quote Post
goran
post 19.09.2010, 12:35:33
Post #8





Grupa: Zarejestrowani
Postów: 23
Pomógł: 2
Dołączył: 17.09.2010

Ostrzeżenie: (0%)
-----


@Daiquiri - tak. Na poważnie. Dla osoby, która tak jak kps jest kompletnie zielona będzie to najprostsze rozwiązanie. Że mało eleganckie? No cóż smile.gif.
Go to the top of the page
+Quote Post
Daiquiri
post 19.09.2010, 13:00:46
Post #9





Grupa: Administratorzy
Postów: 1 552
Pomógł: 211
Dołączył: 7.07.2009
Skąd: NJ




Kompletnie nie o tym pisze. Po prostu zdublowałeś to, co już zostało napisane powyżej (post teherty).
Go to the top of the page
+Quote Post
goran
post 19.09.2010, 21:16:15
Post #10





Grupa: Zarejestrowani
Postów: 23
Pomógł: 2
Dołączył: 17.09.2010

Ostrzeżenie: (0%)
-----


O rany - przeoczyłem. Idę się biczować ...
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 9.06.2025 - 06:03