Title: willwillok's Replies | WordPress.org

---

# willwillok

  [  ](https://wordpress.org/support/users/willwillok/)

 *   [Profile](https://wordpress.org/support/users/willwillok/)
 *   [Topics Started](https://wordpress.org/support/users/willwillok/topics/)
 *   [Replies Created](https://wordpress.org/support/users/willwillok/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/willwillok/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/willwillok/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/willwillok/engagements/)
 *   [Favorites](https://wordpress.org/support/users/willwillok/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Content Blocks (Custom Post Widget)] [PATCH] Custom widget frontends](https://wordpress.org/support/topic/patch-custom-widget-frontends/)
 *  [willwillok](https://wordpress.org/support/users/willwillok/)
 * (@willwillok)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/patch-custom-widget-frontends/#post-4108641)
 * Wohoo, finally got this working, although, to me ‘relatively easy’ is a bit of
   an understatement 😛 I know, I know… two lines of code, but i’m a hack/slasher
   and this took me a while to get working!
 * My template code (will take the post ID, check if there is a template named ‘
   custom-post-widget-###.php and will include. Otherwise it will just return the
   $content as per above )
 * NB: this code pulls the wordpress post ID not the number assigned to the custom
   posts
    I.e NOT custom_post_widget-1!!! templates must be name: ‘custom_post_widget-[
   wpPostID].php
 *     ```
       <?php
       if ( !$apply_content_filters ) { // Don't apply the content filter if checkbox selected
       	$content = apply_filters( 'the_content', $content);
       }
       echo $before_widget;
       if ( $show_custom_post_title ) {
       	echo $before_title;
       	echo apply_filters( 'widget_title',$content_post->post_title);
       	if ( $show_featured_image ) {
       		echo get_the_post_thumbnail( $content_post -> ID );
       	}
       	echo $after_title; // This is the line that displays the title (only if show title is set)
       }
   
       if (file_exists( get_stylesheet_directory(). "/custom-post-widget-{$content_post -> ID}.php")):
       include( get_stylesheet_directory() ."/custom-post-widget-{$content_post -> ID}.php");
   
       else:
   
       echo do_shortcode( $content );
       endif; 
   
       echo $after_widget;
       ```
   
 * Thanks for your initial work/help on this guys
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Content Blocks (Custom Post Widget)] [PATCH] Custom widget frontends](https://wordpress.org/support/topic/patch-custom-widget-frontends/)
 *  [willwillok](https://wordpress.org/support/users/willwillok/)
 * (@willwillok)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/patch-custom-widget-frontends/#post-4108635)
 * Hey guys,
 * Nice work on the patch and also the plugin!
 * A question that both flyns’ and Johan may be able to answer:
 * Is there any way to adjust your patch to pull a template created for a specific
   content block using the unique ID assigned to each block…
 * > eg. custom-post-widget-1.php <— would be applied to custom post widget id-1
   > and so-on
 * Thanks alot,
 * and keep up the great work.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Populate Select Box from database](https://wordpress.org/support/topic/plugin-contact-form-7-populate-select-box-from-database/)
 *  [willwillok](https://wordpress.org/support/users/willwillok/)
 * (@willwillok)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-populate-select-box-from-database/#post-2352831)
 * Hey WZShop. Thanks this works great…
 * Do you know how to adjust this code to get multiple selectors from different 
   catergories?
 * thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[FA Lite - WP responsive slider plugin] [Plugin: Featured Articles Lite] Image clickable](https://wordpress.org/support/topic/plugin-featured-articles-lite-image-clickable/)
 *  [willwillok](https://wordpress.org/support/users/willwillok/)
 * (@willwillok)
 * [14 years ago](https://wordpress.org/support/topic/plugin-featured-articles-lite-image-clickable/#post-2371324)
 * actually… this css should work with any size.
 *     ```
       #slider-link {
       display:block;
       height:100%;
       width:100%;
       text-indent:-9999px;
       z-index:9999;}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[FA Lite - WP responsive slider plugin] [Plugin: Featured Articles Lite] Image clickable](https://wordpress.org/support/topic/plugin-featured-articles-lite-image-clickable/)
 *  [willwillok](https://wordpress.org/support/users/willwillok/)
 * (@willwillok)
 * [14 years ago](https://wordpress.org/support/topic/plugin-featured-articles-lite-image-clickable/#post-2371323)
 * Hey, did you find a solution?
    I found a way using a text hyperlink and text-
   indent in css.
 * I’m no pro, but this is what I did…
 * Working with a new custom theme I’ve created based on ‘smoke-dark’,
    in the display.
   php file I found a couple of lines that look like this:
 *     ```
       <?php foreach ($postslist as $post):?>
       		<div class="FA_article <?php the_fa_class();?>" style="<?php the_fa_background(); ?>; <?php the_slider_height();?>" >
               	<div class="FA_wrap">
       				<?php the_fa_title('<h2>', '</h2>');?>
       ```
   
 * I added this:
 *     ```
       <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" id="slider-link" > </a>
       ```
   
 * before the `<div class="FA_wrap">` as per below…
 *     ```
       <?php foreach ($postslist as $post):?>
       		<div class="FA_article <?php the_fa_class();?>" style="<?php the_fa_background(); ?>; <?php the_slider_height();?>" ><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" id="slider-link" > </a>
               	<div class="FA_wrap">
       				<?php the_fa_title('<h2>', '</h2>');?>
       ```
   
 * Within the hyperlink I added, I’ve set the ‘id’ to “slider-link”
    To match this,
   in the dark.css file I added a new class:
 *     ```
       #slider-link {
       display:block;
       height:510px;
       width:355px;
       text-indent:-9999px;
       z-index:9999;}
       ```
   
 * _NB: You would need to make different classes for different sized sliders, as
   the ‘slider-link’ width and height will need to vary based on the dimensions 
   of your custom slider(s)_

Viewing 5 replies - 1 through 5 (of 5 total)