Find Jobs
Hire Freelancers

Wordpress Sitemap code in functions.php

$10-30 USD

Closed
Posted about 3 years ago

$10-30 USD

Paid on delivery
I have php code to include in [login to view URL] This code shows sitemap with all the pages and blog post: [login to view URL] I need: 1. URL become a link 2. I don't want all pages and post to be shown in [login to view URL] . I want pages/posts using ([login to view URL], [login to view URL], single php) in the sitemap . I dont want pages/posts using ([login to view URL], [login to view URL]) in the sitemap > I am expecting a new php code in [login to view URL] you can include in this project sample [login to view URL] > You are having FTP access in order to modify it. Payment is for both solutions once it is done ------ PHP current code in [login to view URL] // Code to generate [login to view URL] function xml_sitemap() { $postsForSitemap = get_posts(array( 'numberposts' => -1, 'orderby' => 'modified', 'post_type' => array('post','page'), 'order' => 'DESC' )); $sitemap = '<?xml version="1.0" encoding="UTF-8"?>'; $sitemap .= '<urlset xmlns="[login to view URL]">'; foreach($postsForSitemap as $post) { setup_postdata($post); $postdate = explode(" ", $post->post_modified); $sitemap .= '<url>'. '<loc>'. get_permalink($post->ID) . '</loc>'. '<lastmod>'. $postdate[0] .'</lastmod>'. '<changefreq>monthly</changefreq>'. '</url>'; } $sitemap .= '</urlset>'; $fp = fopen(ABSPATH . "[login to view URL]", 'w'); fwrite($fp, $sitemap); fclose($fp); } add_action("publish_post", "xml_sitemap"); add_action("publish_page", "xml_sitemap"); // END Code to generate [login to view URL]
Project ID: 29694880

About the project

8 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
8 freelancers are bidding on average $28 USD for this job
User Avatar
Hello. Wordpress development expert ready to help you with plugin modification. I have more 400 good reviews and more 9 years of development experience behind, so all will be done with best quality and timeframe. Free bugfixing support. We can always make deal on price. Tnx, and hope to hear you soon.
$30 USD in 1 day
4.9 (605 reviews)
8.2
8.2
User Avatar
Hello, hope you doing great. I can do it. I am ready to start work as soon as you confirm. Relevant Skills and Experience I have more than 3 years of professional experience in PHP, CSS, HTML, JS, Jquery, Bootstrap,Angular, Ajax,Laravel, python ,Wordpress, MERN.
$20 USD in 1 day
4.7 (111 reviews)
5.9
5.9
User Avatar
i am ready to start now Have read your description on project very carefully. I'm a professional developer with 1+ year experience as you can see my profile. Have completed many similar projects perfectly till now and can surely provide excellent result. Let's discuss more and start the working soon. I am looking forward to hear from you.
$30 USD in 1 day
5.0 (32 reviews)
4.8
4.8
User Avatar
Hi There How are you today? https://www.freelancer.com/projects/php/URGENT-Woocommerce-customization-11984660/reviews Plase let me introduce myself to you. Respectfully, Masud Web Designer & Developer
$30 USD in 1 day
5.0 (23 reviews)
4.5
4.5
User Avatar
Hi there, I have 7+ Years of experience in Web Development, Digital marketing & Graphic designing. I am based on WordPress, and also make custom plugins for it. We can connect on chat for more details. Regards
$25 USD in 2 days
5.0 (5 reviews)
4.0
4.0

About the client

Flag of SPAIN
Barcelona, Spain
5.0
1
Member since Jul 7, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.