Using the_title() as a variable in the loop
-
Hi,
I am trying to integrate BinaryMoon’s BMShots Plugin (https://www.binarymoon.co.uk/projects/bm-shots-automated-screenshots-website/) into a custom loop.
In Twentyten, I tried to insert:
When I declare $url directly, it works….
$url = 'https://www.binarymoon.co.uk/';
But when I try to assign it dynamically….
<?php $url = the_title(); echo $url; $width = 300; echo bm_mshot ($url, $width); ?>
… bm_mshot does not return anything. The post titles are plain URLs.
So the_title() obviously is the output of a function, but how do I assign it to the $url variable? The end result is supposed to output a screenshot for each post (on the overview and the single post pages).
Thanks for any pointers!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using the_title() as a variable in the loop’ is closed to new replies.