Forum Replies Created

Viewing 6 replies - 136 through 141 (of 141 total)
  • Honestly, I am not so familiar with the ($postclass = ($post == $posts[0])) bit. I have tried to use it but it made the following lines so complicated.

    You can still use what I suggest.

    <?php if (have_posts()) : ?>
     <?php query_posts("showposts=1"); // show one latest post only ?>
      <?php while (have_posts()) : the_post(); ?>
       <div class="entry-head firstpost">
       LATEST POST:
       <!-- all the usual template tags here i.e. title, excerpts, date, etc.  -->
       </div>
      <?php endwhile; ?>
     <?php query_posts("showposts=4&offset=1"); // show 4 latests posts excluding the latest ?>
      <?php while (have_posts()) : the_post(); ?>
       <div class="entry-head">
       <!-- all the usual template tags here i.e. title, excerpts, date, etc.  -->
       </div>
     <?php endwhile; ?>
    <?php else: ?>
     <!-- Error message when no post published -->
    <?php endif; ?>

    It may be a bit longer since you repeat most of the template tags twice but it works.

    Oh, forgot to mention. I use domain pointers. Set new.net to point at main.com.

    I have thought of a similar idea. Then I tried to add the following in wp-config.php and it works.

    $hostname = $_SERVER['SERVER_NAME'];
    $hostname = str_replace('www.', '', $hostname);
    if ($hostname == 'new.net') {
    define('WP_SITEURL', 'https://new.net');
    define('WP_HOME', 'https://new.net');
    }

    What exactly you are trying to do?

    Is it something like this? Then, I’ve offered a solution.

    Just instal on a subdomain. This is what I usually do:

    My main site is: https://www.mainsite.com

    Thenk I have an idea of a new project using WP, so I install it at:

    thenewproject.com.mainsite.com

    sometimes i have too many such ideas, i do like this:

    thenewproject.com.1.mainsite.com
    theotherproject.net.1.mainsite.com
    thenewproject.com.2.mainsite.com
    theotherproject.net.2.mainsite.com

    my hosting allowed multiple domains, so I just add the projects as new domains. you can still use subdomains.

    I was trying to do something similar and discovered something pretty simple. You may try the following:

    <?php if (have_posts()) : ?>
     <?php query_posts("showposts=1"); // show one latest post only ?>
      <?php while (have_posts()) : the_post(); ?>
       <!-- the latest post here -->
      <?php endwhile; ?>
     <?php query_posts("showposts=4&offset=1"); // show 4 latests posts excluding the latest ?>
      <?php while (have_posts()) : the_post(); ?>
       <!-- the subsequent posts here -->
     <?php endwhile; ?>
    <?php else: ?>
     <!-- Error message when no post published -->
    <?php endif; ?>

    Hope it helps. ??

Viewing 6 replies - 136 through 141 (of 141 total)