Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Wordpress - Featured image problem

[es] :: Web aplikacije :: Wordpress - Featured image problem

[ Pregleda: 1616 | Odgovora: 7 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Karamazov
Pravnik
Srbija

Član broj: 310732
Poruke: 21
*.dynamic.isp.telekom.rs.



+1 Profil

icon Wordpress - Featured image problem14.02.2013. u 16:33 - pre 136 meseci
Pozdrav,

imam sledeći problem. Nikako ne mogu da pronađem featured image opciju. Ubacio sam dodatak Featured image, međutim da bi navedenu aktivirao potrebno je da ubacim Shorcode [featured-img] negde ali ne znam gde. Takođe trebalo bi u Theme loop fajl ubaciti <?php if ( function_exists('get_featured_img') ) get_featured_img(); ?> ali ne znam gde tačno u loop.php fajl.
Da li mi neko može pomoći?
Bez Feature image opcije ne mogu da promenim ključne stvari u temi.

Hvala unapred.
 
Odgovor na temu

cyBerManIA
I ovo T ono
Space

Član broj: 25195
Poruke: 698
*.ptt.rs.

Sajt: www.facebook.com/cyberman..


+263 Profil

icon Re: Wordpress - Featured image problem14.02.2013. u 17:23 - pre 136 meseci
Jel tvoja tema podrzava featured image? Da li kad pises post imas sa strane opciju da dodas featured image?

Za shortcode ne editujes .php fajlove, jer se oni postavljaju unutar postova a postovi su vec unutar loopa. Ukoliko taj shortcode stavis unutar php fajla, dobices samo gresku. Mozes u postu/strani/CPT da ubacis shortcode [featured-img] i slika ce se pojaviti na tom mestu gde si stavio, naravno ukoliko radi plugin - nisam imao potrebu da ga koristim.

Ukoliko zelis na primer na glavnoj sranici da postavis slicice prilikom listanja postova, onda moras da editujes .php fajl i ubacis funkciju unutar loopa (drugi kod koji si kopirao). Zavisno od teme i zavisno od toga gde zelis da umetnes, zavisi i koji fajl treba da editujes. Ne mozemo ovako da ti napisemo, nemamo pasuljce..

Da bi skontao loop i da bi nasao/znao gde trebas da kopiras f-ju (ukoliko se odlucis za taj nacin), pocni odavde.
 
Odgovor na temu

Karamazov
Pravnik
Srbija

Član broj: 310732
Poruke: 21
*.dynamic.isp.telekom.rs.



+1 Profil

icon Re: Wordpress - Featured image problem14.02.2013. u 17:58 - pre 136 meseci
Konkretno radi se o temi Sliding Door. Tih 7 slika na naslovnoj strani su mi hyperlinkovi do određenih tema a da bi to uradio potrebno je da promenim slike. Tema podržava Feature image, čitao sam komentare drugih korisnika, ali kod mene je problem što tu opciju od početka nemam nikako. Znam gde treba da stoji ali je nema, zato sam odlučio i da ubacim gore navedeni dodatak kako bi mi ta funkcija radila.
Ovo je prvi put da koristim WordPress i prvi sajt. :)

Proučiću taj tekst o loop-u pa ću pokušati tako da aktiviram dodatak (ako skontam ;) )...

Evo primer loop.php fajla:

Code:
<?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 Sliding_Door
 * @since Sliding Door 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">&larr;</span> Older posts', 'slidingdoor' ) ); ?></div>
        <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'slidingdoor' ) ); ?></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', 'slidingdoor' ); ?></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.', 'slidingdoor' ); ?></p>
            <?php get_search_form(); ?>
        </div><!-- .entry-content -->
    </div><!-- #post-0 -->
<?php endif; ?>

<?php
    /* Start the Loop.
     *
     * In Sliding Door 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 in the Gallery category. */ ?>

    <?php if ( in_category( _x('gallery', 'gallery category slug', 'slidingdoor') ) ) : ?>
        <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', 'slidingdoor' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

            <div class="entry-meta">
                <?php slidingdoor_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( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'slidingdoor' ),
                                'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'slidingdoor' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
                                $total_images
                            ); ?></em></p>
                <?php endif; ?>
                        <?php the_excerpt(); ?>
<?php endif; ?>
            </div><!-- .entry-content -->

            <div class="entry-utility">
                <a href="<?php echo get_term_link( _x('gallery', 'gallery category slug', 'slidingdoor'), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'slidingdoor' ); ?>"><?php _e( 'More Galleries', 'slidingdoor' ); ?></a>
                <span class="meta-sep">|</span>
                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'slidingdoor' ), __( '1 Comment', 'slidingdoor' ), __( '% Comments', 'slidingdoor' ) ); ?></span>
                <?php edit_post_link( __( 'Edit', 'slidingdoor' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
            </div><!-- .entry-utility -->
        </div><!-- #post-## -->

<?php /* How to display posts in the asides category */ ?>

    <?php elseif ( in_category( _x('asides', 'asides category slug', 'slidingdoor') ) ) : ?>
        <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">&rarr;</span>', 'slidingdoor' ) ); ?>
            </div><!-- .entry-content -->
        <?php endif; ?>

            <div class="entry-utility">
                <?php slidingdoor_posted_on(); ?>
                <span class="meta-sep">|</span>
                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'slidingdoor' ), __( '1 Comment', 'slidingdoor' ), __( '% Comments', 'slidingdoor' ) ); ?></span>
                <?php edit_post_link( __( 'Edit', 'slidingdoor' ), '<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', 'slidingdoor' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

            <div class="entry-meta">
                <?php slidingdoor_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">&rarr;</span>', 'slidingdoor' ) ); ?>
                <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'slidingdoor' ), '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', 'slidingdoor' ), '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', 'slidingdoor' ), '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', 'slidingdoor' ), __( '1 Comment', 'slidingdoor' ), __( '% Comments', 'slidingdoor' ) ); ?></span>
                <?php edit_post_link( __( 'Edit', 'slidingdoor' ), '<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">&larr;</span> Older posts', 'slidingdoor' ) ); ?></div>
                    <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'slidingdoor' ) ); ?></div>
                </div><!-- #nav-below -->
<?php endif; ?>
 
Odgovor na temu

deedee5

Član broj: 74722
Poruke: 788
*.dynamic.isp.telekom.rs.



+323 Profil

icon Re: Wordpress - Featured image problem14.02.2013. u 18:23 - pre 136 meseci
Sve imaš već u temi...

HOW TO SET UP THE SLIDING MENUS
**************************************************

1. Go into Appearance - Menus
2. Create a New menu and add 7 Pages or categories to it.
3. A new dropdown will appear on the left called 'Sliding Navigation' Select your new menu here.


This theme recommends the following plugin: Page Links To.



HOW TO CHANGE THE IMAGES
**************************************************

1. Make the images using photoshop
You can download the original photo shop file from the theme homepage.
The titles of the images are changed by editing the image in photoshop.
Get any picture, crop it to 320 x 200, then write the text on it, and save it as a jpg.
Try to make the filesize small - in photoshop you do this by 'save for web' and choose medium or low quality - not high.

2. Go to a post and select 'upload image'
3. Select 'use as featured image'. This will set that image to the sliding door for that page.








[Ovu poruku je menjao deedee5 dana 14.02.2013. u 19:33 GMT+1]

[Ovu poruku je menjao deedee5 dana 14.02.2013. u 19:36 GMT+1]

[Ovu poruku je menjao deedee5 dana 14.02.2013. u 19:37 GMT+1]
Everything will be okay in the end. If it's not okay, it's not the end.

 
Odgovor na temu

Karamazov
Pravnik
Srbija

Član broj: 310732
Poruke: 21
*.dynamic.isp.telekom.rs.



+1 Profil

icon Re: Wordpress - Featured image problem14.02.2013. u 19:59 - pre 136 meseci
Citat:
deedee5
2. Go to a post and select 'upload image'
3. Select 'use as featured image'. This will set that image to the sliding door for that page.


Da, ali problem je tačka br.3 jer ja nemam tu opciju. Razumem kako treba promeniti sliding meni ali ne prihvata slike bez te opcije. To je ono što želim da ubacim preko loop fajla.
 
Odgovor na temu

deedee5

Član broj: 74722
Poruke: 788
*.dynamic.isp.telekom.rs.



+323 Profil

icon Re: Wordpress - Featured image problem14.02.2013. u 20:07 - pre 136 meseci
Tema je u redu i kod mene radi kako treba...
Ako hoćeš ostavi link do sajta možda cyBer uhvati malo vremena da pogleda šta ne valja :)
Možda opet neki drugi plugin nešto brlja.

Edit:
Dibidus pitanje - Kada pišeš ili edituješ post, u gornjem desnom uglu imaš screen options, dali ti je tu čekirano featured images?

[Ovu poruku je menjao deedee5 dana 14.02.2013. u 21:20 GMT+1]
Everything will be okay in the end. If it's not okay, it's not the end.

 
Odgovor na temu

milosbeo
Loading...

Član broj: 220015
Poruke: 438
*.dynamic.isp.telekom.rs.

Sajt: www.umrezen.in.rs


+82 Profil

icon Re: Wordpress - Featured image problem14.02.2013. u 20:31 - pre 136 meseci
Donji desni ugao kad editujes post/page.... Use as featured.....
 
Odgovor na temu

Karamazov
Pravnik
Srbija

Član broj: 310732
Poruke: 21
*.dynamic.isp.telekom.rs.



+1 Profil

icon Re: Wordpress - Featured image problem14.02.2013. u 21:17 - pre 136 meseci
Uspeo sam. Hvala svima na savetima.
Napravio sam novu bazu, novi sajt i sve ispočetka pokušao i sad radi. Šta se desilo pa nije htelo da radi ne znam ali bitno da je sada ok.
Hvala još jednom svima.

Pozdrav :)
 
Odgovor na temu

[es] :: Web aplikacije :: Wordpress - Featured image problem

[ Pregleda: 1616 | Odgovora: 7 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.