Forum Replies Created

Viewing 12 replies - 16 through 27 (of 27 total)
  • Thread Starter nazzilla

    (@nazzilla)

    only if i’m log in in my wp i can see content of future page
    why?

    Thread Starter nazzilla

    (@nazzilla)

    yes, firefox sometimes show content, sometimes no,
    how i can fix it?why content doesnt appear?

    Thread Starter nazzilla

    (@nazzilla)

    other problem
    in firefox i see correct single page if i click on a post
    but in other browser there’s error page not found

    try this page

    there’s a way to fix?
    i try to use cron, but dont work.What define(‘DISABLE_WP_CRON’, true) do exatly?

    Thread Starter nazzilla

    (@nazzilla)

    Yeah!
    but i prefer to use custom category-id.php, each for category,beacause i need to change visualization, and work with my last code posted 🙂
    thankz a lot!

    Thread Starter nazzilla

    (@nazzilla)

    i forget, i use this code

    <?php
    $args=array(
      'post_type' => 'post',
      'post_status' => 'future,publish',
      'posts_per_page' => -1,
      'caller_get_posts'=> 1
    );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <div id="post-<?php the_ID(); ?>" class="post">
    	<?php
    	$category = get_the_category();
    	$currentcat = $category[0]->cat_name;
    	?>
    	<?php if ($currentcat == "news"){ ?>
    	<h2 class="storytitle"><?php the_title(); ?></h2>
    
        <?php } else { ?>
        <h2 class="storytitle"><a href="<?php the_permalink() ?>" rel="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
        <?php }; ?>
        <?php the_date('','<h4>','</h4>'); ?>
    	<div class="storycontent">
    		<?php the_content(__('(more...)')); ?>
    	</div>
    	<div class="back-top"><a href="#topmenu" title="back to top">Back to top</a></div>
    	</div>
    
        <?php endwhile; } else { ?>;
    	  <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php }
    wp_reset_query();  // Restore global post data stomped by the_post().
    ?>
    Thread Starter nazzilla

    (@nazzilla)

    ok work fine!
    now there’s other problem, if i what show post by category loop show all post, exatly i see index.php post like category.php, it’snt sort by category.
    you can see it here

    Thread Starter nazzilla

    (@nazzilla)

    in which way can be helpfull for me use define(‘DISABLE_WP_CRON’, true)?
    what kind of function it’s?
    what it did?

    Basically:I want show future and past post in same loop,
    or better , “say” to core when you post ignore the date sort/order, pls 🙂

    i hope you can undestand, my eng is terrible

    Thread Starter nazzilla

    (@nazzilla)

    nice!
    it work

    but
    i’ve other condition in the query, if i put this code before other i’ve 2 kind of query post
    i can disable it from the core or this is only one solution?

    you can use something like

    <?php if (have_posts()) : ?>
         <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("category_name=catname&showposts=3&paged=$paged"); ?>
    
         <?php if ( $paged == 1 ) {  ?>

    if you have a code like this

    <?php if (have_posts()) : ?>
         <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("category_name=catname&showposts=3&paged=$paged"); ?>

    you can use
    <?php if ( $paged == 1 ) { somecode } ?>

    i do redirect, in same page where user do login with:
    redirect_to=<?php echo “http://&#8221; . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]; ?>

    add this in form like or where-you-want:
    <form id=”loginform” action=”<?php echo site_url(‘wp-login.php’, ‘login_post’) ?>?redirect_to=<?php echo “http://&#8221; . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]; ?>” method=”post” name=”loginform”>

    like this:

    <form id="loginform" action=" <?php echo site_url('wp-login.php', 'login_post') ?>&redirect_to=index.php" method="post" name="loginform">
        	username: <input type="text" name="log" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" />
            password: <input type="password" name="pwd" id="user_pass" class="input" value="" />
            <?php do_action('login_form'); ?>
            <input name="login" type="submit" value="<?php esc_attr_e('Log In'); ?>" id="login" class="bottone-login" />
          </form>

Viewing 12 replies - 16 through 27 (of 27 total)