Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8560689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:20:02+00:00 2026-06-11T16:20:02+00:00

I have a wordpress blog currently installed at blog.mydomain.com. I am creating a mobile

  • 0

I have a wordpress blog currently installed at blog.mydomain.com. I am creating a mobile version of my site at m.mydomain.com which will have a blog section. Obviously I want to use the same database and just pull in all the blog posts and display them with CSS customized for the mobile site. How can I accomplish this?

EDIT: Here is the code I’m trying to insert the blog posts into:

<div class="blog">
    <div class="section-header">
        <img class="section-logo" src="images/logo-small.png" alt="img">
        <a href="#" class="section-navigation-deploy"><img class="navigation-deploy-icon" src="images/nav-icon.png" alt="img"></a>
        <div class="clear"></div>
   </div>
   <div class="deco-open"></div>

   <?php
require('http://blog.mydomain.com/wp-blog-header.php');
$posts = get_posts('numberposts=-1&order=DSC&orderby=date');
?>

   <?php foreach ($posts as $post) : start_wp(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<section><?php the_excerpt(); ?></section>
<?php endforeach; ?>


    <div class="deco-close"></div>


</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:20:04+00:00Added an answer on June 11, 2026 at 4:20 pm
    <?php
      require('./blog/wp-blog-header.php');
      $posts = get_posts('numberposts=-1&order=DSC&orderby=date');
    ?>
    

    The require should point to the wp-blog-header.php file in the root of your blog directory.

    This is the code I am currently using in wwwroot/index.php and my blog is in wwwroot/blog Once I get $posts I’ll display the contents with:

    <?php foreach ($posts as $post) : start_wp(); ?>
      <article>
        <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
        <section><?php the_excerpt(); ?></section>
      </article>
    <?php endforeach; ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a custom themed blog running on wordpress with Jetpack installed. I
I have a wordpress blog www.freelancing4arab.com, I want to change the theme font, I
I am creating a wordpress blog for a magazine. They have a legacy blog
Currently I have my Facebook profile automatically republish blog posts from a WordPress instance.
I am currently working on my Wordpress blog, which is hosted on a VPS.NET
I'm currently using Wordpress.com to host my blog, but I would like more control
I have my wordpress blog at www.mysite.com , also I have my own php
I currently have a blog at blogger.com with a custom domain name. I have
I'm working on a site http://www.infinite-possibility.com/ which is currently having a problem with any
I currently have a wordpress blog that assigns a number to each one of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.