Jak USUNĄĆ czytaj dalej?/ Jedno hasło do całego WP
-
Witam!
No i zapętliłam się… :/ Word Press, z którym mam problem to http://www.akiline.pl/zdrowie. I dwa pytania:
1. Chcę w tym WP całkowicie wyeliminować funkcję czytaj dalej. Włączyć łatwo, a wyłączyć? W kodzie? Jeśli tak,to gdzie? Nie jestem w tych sprawach specem, wolałabym nie namieszać..
A poza tym, nie wiem, czy jedno z drugim jest związane, czy nie, potrzebuję, zeby treść posta była od razu wyświetlana w html-u, a nie dopiero po wejściu.2. Chciałabym, zeby całość była zabezpieczona hasłem. Wiem, można haslować wpisy, ale chodzi mi o jedno hasło „wejściowe”, coś tak jak tu: http://www.myszmysz.blog.pl (może byc samo hasło, bez użytkownika)
Pozdrawiam i z góry dzięki za pomoc! 🙂
-
AD.1. Treścią posta jest tabelka pisana ręcznie w html-u
1. Pokaż kod pliku index.php
2. poczytaj o .htaccess i .htpasswdHEj! amistad, Ty kiedyś sypiasz? 😉
1. index.php thema:
<br /> <?php<br /> /**<br /> * The main template file.<br /> *<br /> * This is the most generic template file in a WordPress theme<br /> * and one of the two required files for a theme (the other being style.css).<br /> * It is used to display a page when nothing more specific matches a query.<br /> * E.g., it puts together the home page when no home.php file exists.<br /> * Learn more: http://codex.wordpress.org/Template_Hierarchy<br /> *<br /> * @package WordPress<br /> * @subpackage Twenty_Ten<br /> * @since Twenty Ten 1.0<br /> */</p> <p>get_header(); ?></p> <p> <div id="container"><br /> <div id="content" role="main"></p> <p> <?php<br /> /* Run the loop to output the posts.<br /> * If you want to overload this in a child theme then include a file<br /> * called loop-index.php and that will be used instead.<br /> */<br /> get_template_part( 'loop', 'index' );<br /> ?><br /> </div><!-- #content --><br /> </div><!-- #container --></p> <p><?php get_sidebar(); ?><br /> <?php get_footer(); ?><br /> </code>
Index.php ogólne
<br /> <?php<br /> /**<br /> * Front to the WordPress application. This file doesn't do anything, but loads<br /> * wp-blog-header.php which does and tells WordPress to load the theme.<br /> *<br /> * @package WordPress<br /> */</p> <p>/**<br /> * Tells WordPress to load the WordPress theme and output it.<br /> *<br /> * @var bool<br /> */<br /> define('WP_USE_THEMES', true);</p> <p>/** Loads the WordPress Environment and Template */<br /> require('./wp-blog-header.php');<br /> ?><br />
2. Dzięki, z pewnością poczytam 🙂
Index z wp-admin:
<?php /** * Dashboard Administration Panel * * @package WordPress * @subpackage Administration */</p> <p>/** Load WordPress Bootstrap */ require_once('./admin.php');</p> <p>/** Load WordPress dashboard API */ require_once(ABSPATH . 'wp-admin/includes/dashboard.php');</p> <p>wp_dashboard_setup();</p> <p>wp_enqueue_script( 'dashboard' ); wp_enqueue_script( 'plugin-install' ); wp_enqueue_script( 'media-upload' ); wp_admin_css( 'dashboard' ); wp_admin_css( 'plugin-install' ); add_thickbox();</p> <p>$title = __('Dashboard'); $parent_file = 'index.php';</p> <p>if ( is_user_admin() ) add_screen_option('layout_columns', array('max' => 4, 'default' => 1) ); else add_screen_option('layout_columns', array('max' => 4, 'default' => 2) );</p> <p>add_contextual_help($current_screen,</p> <p> '<p>' . __( 'Welcome to your WordPress Dashboard! You will find helpful tips in the Help tab of each screen to assist you as you get to know the application.' ) . '</p>' . '<p>' . __( 'The Admin Bar at the top, new in 3.1, provides quick access to common tasks when you are viewing your site.' ) . '</p>' . '<p>' . __( 'The left-hand navigation menu provides links to the administration screens in your WordPress application. You can expand or collapse navigation sections by clicking on the arrow that appears on the right side of each navigation item when you hover over it. You can also minimize the navigation menu to a narrow icon strip by clicking on the faint separator lines between the Dashboard and Posts sections, or between Comments and Appearance; when minimized, the submenu items will be displayed on hover.' ) . '</p>' . '<p>' . __( 'You can configure your dashboard by choosing which boxes, or modules, to display in the work area, how many columns to display them in, and where each box should be placed. You can hide/show boxes and select the number of columns in the Screen Options tab. To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box. You can also expand or collapse each box by clicking once on the title bar of the box. In addition, some boxes are configurable, and will show a “Configure” link in the title bar when you hover over it.' ) . '</p>' . '<p>' . __( 'The boxes on your Dashboard screen are:' ) . '</p>' . '<p>' . __( '<strong>Right Now</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '</p>' . '<p>' . __( '<strong>Recent Comments</strong> - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.' ) . '</p>' . '<p>' . __( '<strong>Incoming Links</strong> - Shows links to your site found by Google Blog Search.' ) . '</p>' . '<p>' . __( '<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.' ) . '</p>' . '<p>' . __( '<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you’ve started.' ) . '</p>' . '<p>' . __( '<strong>WordPress Development Blog</strong> - Come here for the latest scoop.' ) . '</p>' . '<p>' . __( '<strong>Other WordPress News</strong> - Shows the feed from <a href="http://planet.wordpress.org">WordPress Planet</a>. You can configure it to show a different feed of your choosing.' ) . '</p>' . '<p>' . __( '<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.' ) . '</p>' . '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="http://codex.wordpress.org/Dashboard_SubPanel">Documentation on Dashboard</a>' ) . '</p>' . '<p>' . __( '<a href="http://wordpress.org/support/">Support Forums</a>' ) . '</p>' );</p> <p>include (ABSPATH . 'wp-admin/admin-header.php');</p> <p>$today = current_time('mysql', 1); ?></p> <p><div class="wrap"> <?php screen_icon(); ?> <h2><?php echo esc_html( $title ); ?></h2></p> <p><div id="dashboard-widgets-wrap"></p> <p><?php wp_dashboard(); ?></p> <p><div class="clear"></div> </div><!-- dashboard-widgets-wrap --></p> <p></div><!-- wrap --></p> <p><?php require(ABSPATH . 'wp-admin/admin-footer.php'); ?></p> <p>
Posiadasz w plikach szablonu pliki podobne do loop.php albo loop-index.php?
już się robi 🙂
<?php /** * The loop that displays posts. * * The loop displays the posts and the post content. See * http://codex.wordpress.org/The_Loop to understand it and * http://codex.wordpress.org/Template_Tags to understand * the tags used in it. * * This can be overridden in child themes with loop.php or * loop-template.php, where 'template' is the loop context * requested by a template. For example, loop-index.php would * be used if it exists and we ask for the loop with: * <code>get_template_part( 'loop', 'index' );</code> * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id="nav-above" class="navigation"> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> </div><!-- #nav-above --> <?php endif; ?> <?php /* If there are no posts to display, such as an empty archive page */ ?> <?php if ( ! have_posts() ) : ?> <div id="post-0" class="post error404 not-found"> <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </div><!-- #post-0 --> <?php endif; ?> <?php /* Start the Loop. * * In Twenty Ten we use the same loop in multiple contexts. * It is broken into three main parts: when we're displaying * posts that are in the gallery category, when we're displaying * posts in the asides category, and finally all other posts. * * Additionally, we sometimes check for whether we are on an * archive page, a search page, etc., allowing for small differences * in the loop on each template without actually duplicating * the rest of the loop that is shared. * * Without further ado, the loop: */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?> <?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <?php twentyten_posted_on(); ?> </div><!-- .entry-meta --> <div class="entry-content"> <?php if ( post_password_required() ) : ?> <?php the_content(); ?> <?php else : ?> <?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); ?> <div class="gallery-thumb"> <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> </div><!-- .gallery-thumb --> <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', number_format_i18n( $total_images ) ); ?></em></p> <?php endif; ?> <?php the_excerpt(); ?> <?php endif; ?> </div><!-- .entry-content --> <div class="entry-utility"> <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?> <a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> <span class="meta-sep">|</span> <?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> <a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?> <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <div class="entry-utility"> <?php twentyten_posted_on(); ?> <span class="meta-sep">|</span> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php /* How to display all other posts. */ ?> <?php else : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <?php twentyten_posted_on(); ?> </div><!-- .entry-meta --> <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <div class="entry-utility"> <?php if ( count( get_the_category() ) ) : ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <?php $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ): ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php comments_template( '', true ); ?> <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?> <?php endwhile; // End the loop. Whew. ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id="nav-below" class="navigation"> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> </div><!-- #nav-below --> <?php endif; ?>
amistad, jeśli ułatwi Ci to choć troszke sprawę, mogę dać Ci login i haslo bezpośrednio do serwera, ale to tak jakoś na priv….
W kodzie masz takie dwie linijki:
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
Popraw je na:
<?php the_content(); ?>
I podziel się efektem na forum.
Podając mi dane do serwera – to jest pomoc indywidualna, i oczywiście mogę tak pomóc, ale odpłatnie. W ten sposób pomagam tylko Tobie, a pisząc na forum, jest szansa że kiedyś trafi na ten temat 10 innych osób, które wykorzystają moje porady.
Dzięki, wypróbuję i oczywiście efektem się podzielę 🙂
Kod poprawiony, dokładnie są to linijki 115 i 143…
No, niestety, nie zadziałało… 🙁
http://akiline.pl/zdrowie/?category_name=mysza
http://akiline.pl/kuchnia/?category_name=wykwintnieJak już wcześniej pisałam (w innym temacie) pewne zasady rozumiem i jeśli będę zmuszona poprzez swoją niewiedzę nadużywać Twojego doświadczenia, rekompensata oczywiście wchodzi w grę. Co nie wyklucza podzielenia się Twoimi wskazówkami…
Teraz się pogubiłem, nie wiem co mi tutaj pokazałaś … te zdrowie i kuchnia są dwoma oddzielnymi blogami przecież, i mają dwa różne szablony. Który z nich obecnie edytowałaś?
Poza tym, na stornie o zdrowiu, wszystkie wpisy są zabezpieczone hasłem, więc nic nie widać – tego też nie rozumiem, po co pisać bloga, robić stronę, i zabezpieczać ją hasłem? Tym bardziej że linki nie wskazują na prywatną stronę.
Już tłumaczę.
Wszystkie zacytowane kody pochodzą z blogu zdrowie, ale ponieważ wpisy są zahasłowane (a co tez pytam w temacie), podałam adres drugiego bloga i identycznych ustawieniach i skopiowanym tym samym pliku loop, żeby był podgląd…
A po co pisać? Jak zauważyłeś, blog zdrowie pełni funkcję elektronicznek książeczki zdrowia. Wrzucane będą do niego wszystkie badania, najczęściej w formie tabelek. Nie są to informacje do publicznej informacji, są przeznaczone dla wetów, stąd hasło. Jednak ponieważ chcę maksymalnie uprościć im pracę, chcę, zeby od razu wyświetlała się treść, a nie zajawka, zwłaszcza, że ta nie obsługuje html
Niestety, ale jeśli to nie działa, to skończyły mi się pomysły, bez dostępu do serwera ciężko się w poprawki bawić – to musiało działać, ale o dziwo jest inaczej 😉
Jak pisałam, z dostępem do serwera nie ma problemu, podaj tylko proszę, swoją cenę, amistad, bo nie wiem, czy mnie stać, czy muszę zacząć ciułać… 😉 No i w jaki sposób przekazać Ci dane?
W profilu mam podanego maila.
- Temat ‘Jak USUNĄĆ czytaj dalej?/ Jedno hasło do całego WP’ jest zamknięty na nowe odpowiedzi.