While reading some threads in the ClassiPress forums about embedding a YouTube video in ClassiPress listings, i figured out a nice way how to accomplish this using the custom fields and form layouts. The advantage of this way is that you don’t need to care if html is enabled or not. Your customers just need to place the YouTube video ID into a custom field that we create in this tutorial. So let’s start getting this done.
I assume that you have ClassiPress and your own child theme running. Time to get started:
The files we need to customize are:
As we don’t change core files directly, we just take a copy of those php files and add them to our child theme folder. Now we start to edit our copies.
Open your /childtheme/single-ad_listings.php and find around line 122 this part of code:
<?php appthemes_after_post_content(); ?>
Above that line you place this:
Dear visitor. Embed a YouTube Video in ClassiPress using a custom field is a premium article. If you would like to get access to the rest of this article, please pay $ 3.45 USD fee to help me keeping this site alive. After your payment is done you will automatically receive an Email that includes an activation link. Please Note: The activation link is valid for 2 days.