Post top 3 Blog posts from Wordpress on a HTML Home Page

完了済み 投稿 5年前 着払い
完了済み 着払い

Looking for code to be added to my [login to view URL] page to display the top 3 Blog posts from my Wordpress blog. The blog is on the same server [login to view URL] and I would like the the blog title, date, image thumbnail and 60 words from the post displayed with a read more button.

Here is code that I found that does this but can't get it to work;

<ul>

<?php

require($_SERVER['DOCUMENT_ROOT'] . '/wordpress/[login to view URL]');

$args = array(

// 'cat' => 3, // Only source posts from a specific category

'posts_per_page' => 2 // Specify how many posts you'd like to display

);

$latest_posts = new WP_Query( $args );

if ( $latest_posts->have_posts() ) {

while ( $latest_posts->have_posts() ) {

$latest_posts->the_post(); ?>

<li>

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">

<?php if ( has_post_thumbnail() ) { ?>

<span class="post_thumbnail"><?php the_post_thumbnail(); ?></span>

<?php } ?>

<span class="post_title"><?php the_title(); ?></span>

</a>

<span class="post_time">Posted on <?php the_time('l jS F, Y') ?></span>

<?php the_excerpt(); ?>

</li>

<? }

} else {

echo '<p>There are no posts available</p>';

}

wp_reset_postdata();

?>

</ul>

CSS HTML MySQL PHP Wordpress

プロジェクトID: #17194579

プロジェクトについて

42個の提案 リモートプロジェクト アクティブ 5年前

アワード:

tlchung

I can make your top 3 blog post show in your html home page. I am a skilled wordpress developer with over 10 years experience. let discuss more via private messages, thanks.

$30 USD 2日以内
(546レビュー)
7.7

42人のフリーランサーが、平均$27 で、この仕事に入札しています。

niravvirani17

here to Post top 3 Blog posts from Wordpress on a HTML Home Page will start right now and do asap ,,,

$35 USD 1日以内
(1099件のレビュー)
8.7
fullstackdev1

Hi there..!! which code you added its can't work directly with HTML file. I have completely understood your requirement and assure you with quality solution in a minimum of time. I can start the job immediately. もっと

$50 USD 0日以内
(630件のレビュー)
8.3
saiSoftIndia

Hello Sir, I have read your requirements and think that I would be a great fit for this project, Ready to start I offer you quality work and time based completion Regards, saiSoftIndia

$30 USD 1日以内
(548件のレビュー)
7.9
therofree

need access to ftp .

$30 USD 0日以内
(644件のレビュー)
7.5
LloydesignStudio

Hi SIr, Please send to me the ftp of your site as well as the wp-admin. and i will do the rest. Thank you Lloyd

$25 USD 1日以内
(546件のレビュー)
7.5
kishanlalyadav

hey ! hey! i m confident to help you for this job so let me help you .... If you work with me, you will get perfect result. thank you !

$35 USD 1日以内
(424件のレビュー)
7.3
amiitkumar19

Hi I have read the job description carefully and able to fulfill your needs . as per your requirements and sure that we can do the project very well. I am available right now for the same , please share the detail like もっと

$30 USD 1日以内
(112件のレビュー)
6.7
hanzalaarqum

Hello, i have read your project description and fully understand that we need to bring Wordpress blog posts onto HTML website. we have to write our own script i need more details so i can understand. waiting for your もっと

$30 USD 1日以内
(178件のレビュー)
6.5
shivansh121

I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I can do ...I もっと

$33 USD 1日以内
(82件のレビュー)
6.5
VRwebdevelopers

here to do 3 Blog posts from Wordpress on a HTML Home Page///////////////////////////////////////////

$25 USD 1日以内
(53件のレビュー)
5.5
poojasaklani

Thank you for the job posting. I have gone through your requirements and feel my strong competency in dealing with your project in an efficient and effective manner. I understand that you are looking for a competent もっと

$20 USD 0日以内
(57件のレビュー)
5.4
waqarwaqar15

Hello I am Wordpress expert. I can call post from a blog to your homepage. Please visit my profile and check my customer reviews it will help you to take hiring decision about me Thanks

$45 USD 1日以内
(29件のレビュー)
5.2
WCTech

Hello, As per your requirement i will post blog on WordPress /html site , so please message me for more discussion. Looking for your positive response... thanks

$20 USD 1日以内
(115件のレビュー)
5.8
ravinderkamboz

Hi, i am a WordPress developer with 4 years of experience. I have done more than 100 sites using WordPress. I am expert in customize the wordPress as per requirements like custom post types, custom taxonomies, custom w もっと

$15 USD 1日以内
(11件のレビュー)
4.4
jaygandhi0692

Hi, We have 4+ years of experience in wordpress / woocommerce platforms. We are sure about your above tasks,we are happy serve our job.

$25 USD 1日以内
(27件のレビュー)
4.3
Intranetman

HI, I AM A PHP PROFESSIONAL AND WEB DEVELOPER. I HAVE EXTENSIVE SKILL IN PHP CODING AND OTHER SUPPORTING LANGUAGES. I HAVE WORKED WITH WORDPRESS BEFORE. I HAVE REVIEWED YOUR CODE AND CAN GET IT WORKING. IT WILL BE A P もっと

$25 USD 1日以内
(5件のレビュー)
2.2
f107

Hi I read the code and can do it In code is added array key .(post_type ). and use foreach instruction. I hope that my thoughts will serve you. Regards.

$30 USD 1日以内
(3件のレビュー)
1.6
gago13

Hi there, if you are looking for dedicated team of experts in this area we are available to work on your projects. Feel free to contact us in private for further details. Thanks & Kind Regards L1NK-TEAM

$72 USD 1日以内
(0件のレビュー)
0.0
LouHilton

Hello, let me introduce myself. My name is Louhilton. I work in finance company as developer. I will try to solve your problem. I am newbie at freelance. If I cannot do this, money guarantee is 100%.

$25 USD 10日以内
(0件のレビュー)
0.0
Jthavalera

A cordial greeting! This problem you are having is easy to solve. I hope I can help you and continue with your activities. Bye!

$25 USD 1日以内
(0件のレビュー)
0.0