WordPress plug-in for dynamic download link?

Your idea of using the current date in the filename would be the easiest. In the template for your page, you could have the following to generate your current day link: <a href=”https://wordpress.stackexchange.com/path/to/file/filename_<?php echo date(“Y-m-d’) ?>.pdf”>Today’s file</a> The above uses the PHP date function to create a filename with the current date appended to it … Read more

Unable to process php via shortcode

The problem is that you are using file_get_contents() which only gets the content of the file (hence the name) if you need to render(evaluate and process the php file) then just use include(). But also if your cup_bc_layout.php file echo’s out something then you should put the include inside an object buffer and then return … Read more

Strip Paragraph Tag

strip_tags — Strip HTML and PHP tags from a string if (!empty($post->post_excerpt)) { $excerpt_raw = strip_tags(get_the_excerpt()); echo $excerpt_raw; }

Unable to Find Space in Custom Function

Ok, well it turns out it has more to do with WordPress then we realised. The wp_link_pages function, in which the hook being used in the question resides, is the culprit rather than anything you’ve done. If you want to have a look, the function is in the post-template.php file inside the wp-includes directory. The … Read more

Last class on last headline?

$count = 1; is set in the while loop, so every time the loop runs it sets to 1 again. Place it before your loop and it will work. $count = 1; if (have_posts()) : while (have_posts()) : the_post(); Ow and the $count++ is outside the loop so it will only run after all the … Read more