List All URLs that outputs an ordered list of all of the website’s published URLs. * Version: 0.2.1 * Author: Evan Scheingross * Author URI: http://www.evanwebdesign.com/ * License: GPL v2 or higher * License URI: License URI: http://www.gnu.org/licenses/gpl-2.0.html * Tested up to: 6.4.1 */ // See http://codex.wordpress.org/Administration_Menus for more info on the process of creating an admin page add_action( ‘admin_menu’, ‘my_plugin_menu’ ); function my_plugin_menu() { add_options_page( ‘List All URLs’, ‘List All URLs’, ‘manage_options’, ‘list-all-urls’, ‘generate_url_list’ ); } function generate_url_list() { if ( !current_user_can( ‘manage_options’ ) ) { wp_die( __( ‘You do not have sufficient permissions to access this page.’ ) ); } $i = 0; $myposttpe = array(); // Creating array variable to house all custom post types $mypostname = array(); // Creating array variable to house all pretty names custom post types // Get all Custom Post Types, and ONLY Custom Post Types. See http://codex.wordpress.org/Function_Reference/get_post_types $args=array( ‘public’ => true, ‘_builtin’ => false ); $output = ‘objects’; // names or objects, note names is the default. $operator = ‘and’; // ‘and’ or ‘or’ $post_types = get_post_types($args,$output,$operator); // Loop through get_post_types and create arrays for custom post type names and labels foreach ($post_types as $post_type ) { $myposttpe[$i] = $post_type->name; // Getting the code name for the post type. See http://codex.wordpress.org/Function_Reference/get_post_type_object $mypostname[$i] = $post_type->labels->singular_name; // Getting the pretty name for the post type. $i++; } $arrlength = count($myposttpe); // Setting variable arrlength equal to the number of array units in $myposttpye // Form and function called on submit sourced in part from http://stackoverflow.com/questions/6060028/call-form-submit-action-from-php-function-on-same-page ?>

Select the URLs you would like to list from the following options:

All URLs (pages, posts, and custom post types)
Pages Only
Posts Only
‘ . $mypostname[$x] . ‘ Posts Only
‘; } ?>
Make the generated list of URLs clickable hyperlinks

‘any’, ‘posts_per_page’ => ‘-1’, ‘post_status’ => ‘publish’ ) ); } else if ($_POST[‘getpost-radio’]==”pages”) { $the_query = new WP_Query( array(‘post_type’ => ‘page’, ‘posts_per_page’ => ‘-1’, ‘post_status’ => ‘publish’ ) ); } else if ($_POST[‘getpost-radio’]==”posts”) { $the_query = new WP_Query( array(‘post_type’ => ‘post’, ‘posts_per_page’ => ‘-1’, ‘post_status’ => ‘publish’ ) ); } else { for($y=0;$y<$arrlength;$y++) { if ($_POST['getpost-radio'] == $myposttpe[$y]) { echo '

test

‘; $the_query = new WP_Query( ‘post_type=’.$myposttpe[$y].’&posts_per_page=-1&post_status=publish’); } } } echo ‘

Below is a list of your requested URLs:

‘; ?>
    have_posts() ) : $the_query->the_post(); ?>
  1. FKL Cleaning Service

    FKL Cleaning service Top Cleaning
    Service Near You!
    Our cleaning service guarantees a spotless home without the hassle. Book Now for a Sparkling Home!
    FKL Cleaning Service Your Local
    Cleaning Experts
    Discover the best cleaning service in town! Experience spotless spaces & peace of mind.
    Schedule your clean today! FKL Cleaning Service Best cleaning
    service in town!
    We provide a deep clean that leaves your house sparkling and fresh. Experience the best cleaning service in town today—schedule your first appointment and enjoy a pristine home!
    bg-slider-shape1 slider-star1

    At FKL Cleaning Service, we use eco-friendly products that are safe for you and the environment, so you can enjoy a healthier space without compromising on quality. Whether it’s a one-time deep clean or regular maintenance, our flexible scheduling and reliable service mean that you can focus on what matters most while we handle the mess.

    Don’t wait any longer – transform your space today! Contact FKL Cleaning Service for a free quote and discover how easy it is to have a clean home or office with our expert help. Your satisfaction is our priority!

X