Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • gwozdzmateusz

    (@gwozdzmateusz)

    Hi!

    So, if u want to attach .js file, all U need to do, is use
    <?php include("file.php"); ?>
    In this file start with
    <script type="text/javascript">
    and close the tag after Your javascript.

    Powodzenia ??

    gwozdzmateusz

    (@gwozdzmateusz)

    Ok, problem solved. What U need to add is

    global $more;
    $more = 0;

    So, query_posts, will look like this:

    <?php query_posts('category_name=Your_Categ_Name&showposts=1');
    global $more;
    $more = 0;
    ?>

    And than the part for displaying the post

    <?php while (have_posts()) : the_post(); ?>
    	<div class="sidebar_cont"><?php the_content(__('Czytaj Ca?o??...')); ?></div>
    
    	<?php endwhile;?>

    Ok, hope it is what U needed
    Cya

    p.s. U may want to read this: https://codex.www.ads-software.com/Template_Tags/query_posts
    very useful

    gwozdzmateusz

    (@gwozdzmateusz)

    <?php query_posts('category_name=Your_Categ_Name&showposts=1'); ?>
    	<?php while (have_posts()) : the_post(); ?>
    	<div class="sidebar_cont"><?php the_content(__('Czytaj Ca?o??...')); ?></div>
    
    	<?php endwhile;?>

    This will display post from any category U want, by its name. The problem is that when U have posts being displayed like this in for example sidebar, than when U go to single posts’s page it won’t display only intro but whole post.

    Anybody knows how to solve this please write!

    Thanks a lot
    And hope this was helpful
    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)