chris joney
asked 9 years ago

hi

i’m using your great theme dw Gamez theme

but i face a small problem

why images in posts not shown in search results !!!

+

why when i put any script in widgets in sidebar it doesn’t work ! even not working in posts

it seems like your theme doesn’t support ajax or so ??

3 Answers
DominicStaff
answered 9 years ago

Hi,
I have checked on our demo and images in posts still shown in search results, you can send me username & password of your site for further checking.
Or you can open the content.php file and replace with new code:

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php if(has_post_thumbnail()) : ?>
    <div class="entry-thumbnail">
        <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail( 'homepage-'.dw_gamez_get_layout() ); ?></a>
    </div>
    <?php endif; ?>

    <header class="entry-header">
        <h2 class="entry-title">
            <a href="<?php the_permalink(); ?>" rel="bookmark">
                <?php if(is_search()) : ?>
                    <?php echo search_title_highlight(); ?>
                <?php else : ?>
                    <?php the_title(); ?>
                <?php endif; ?>
            </a>
        </h2>

        <?php if ( 'post' == get_post_type() ) : ?>
        <div class="entry-meta meta-top">
            <?php dw_gamez_entry_meta(); ?>
        </div>
        <?php endif; ?>
    </header>

    <?php if ( is_search() ) : ?>
    <div class="entry-summary">
        <?php the_excerpt(); ?>
    </div>
    <?php else : ?>
    <div class="entry-content">
        <?php the_content( __( 'Read more ...', 'dw-gamez' ) ); ?>
        <?php
            wp_link_pages( array(
                'before' => '<div class="page-links">' . __( 'Pages:', 'dw-gamez' ),
                'after'  => '</div>',
            ) );
        ?>
    </div>
    <?php endif; ?>
</article>

About the script in the widget, you can try with the following plugin:

Hope this helps !

chris joney
answered 9 years ago

thanks a lot for the reply

but what if i want to add the javascript ad in my posts ?

DominicStaff
answered 9 years ago

If you have a bit of JavaScript code that you want to execute directly on a post or page then just add your code in the “Text” view of the editor like the following:

<script type="text/javascript">
.....
...
..
</script>

Hope this helps !

Powered by DW Question & Answer Pro