[resolved] WP2PDF - Want to pass page slug (3 posts)

  1. keaven
    Posted 10 years ago #

    the call to wp2pdf already passes in the current post ID, but it also lets you pass in other info in its M variable which you can use for the resulting PDF's title. i've been trying to pass in the page's slug for this, but havn't been able to get it to work.

    wp2pdf.php?p=<?php the_ID(); ?>&m=<?php post_name ;?>

    the above just gives a blank M variable. I've had "get_title()" in there, and that works as long as i don't have anything like quotes in the title. the slugs are clean and file-name-friendly, which is why i want to use them. Is there a get_pageslug() function that i've missed? I've looked through the function lists about a dozen times and havn't found anything to help :(

  2. Kafkaesqui

    Posted 10 years ago #

    Try this:

    <?php echo $post->post_name; ?>

  3. keaven
    Posted 10 years ago #

    bonus. that worked. you rock :) thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic