• Hi guys, bit of a wordpress/catch-box newbie here, but I’ve managed to set up a front page ‘featured slider’ that links through ok to posts.

    However i’m trying to link to a page which I’ve set up, not a post, and it’s not showing up (image missing) when typing in the ID of the page instead of the post under ‘Featured Col #x’. There’s an option to add in a ‘featured image’ in the page in question, which I’ve done.

    Is there any way to add to in a link to a page? Any help would be appreciated, many thanks.

    https://www.ads-software.com/extend/themes/catch-box/

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have exactly the same problem – has anyone come up with a fix for this?

    Thanks!

    I also would like to link pages, not posts, through the slider. Please assist.

    Emielb

    (@emielb)

    I’m having the same request here! When adding an ID of a page, my slider doesn’t show it. However the “Edit” button does redirect fine.

    I tried to enhance function catchbox_sliders() in functions.php, but couldn’t make it work.

    Any help or suggestion would be very appreciated !

    Deadpan110

    (@deadpan110)

    Firstly the slider uses WordPress transients to reduce database queries – so you may be seeing a cached result.

    See line 744 in functions.php and uncomment:

    delete_transient( 'catchbox_sliders' );

    Secondly, you can add ‘post_type’ to the query (around line 757 in functions.php):

    $get_featured_posts = new WP_Query( array(
    	'post_type' => 'page',
    	'posts_per_page' => $postperpage,
    	'post__in'		 => $options[ 'featured_slider' ],
    	'orderby' 		 => 'post__in',
    	//'ignore_sticky_posts' => 1 // ignore sticky posts
    ));

    It would be nice if this array used a filter instead for use in child themes, maybe our friendly catch-box developer can add:

    $slider_query = apply_filters(
    	'catch_box_slider_query',
    	array(
    		'posts_per_page' => $postperpage,
    		'post__in'		 => $options[ 'featured_slider' ],
    		'orderby' 		 => 'post__in',
    		'ignore_sticky_posts' => 1 // ignore sticky posts
    );
    $get_featured_posts = new WP_Query($slider_query);
    Emielb

    (@emielb)

    It works great! Thank you very much Deadpan110! ??

    hi! I’m trying to figure out how to do the same thing but for some reason it’s not working — there’s a good chance I’m doing it wrong though! Could someone possibly please explain a bit more in depth how to do this? I tried pasting the above code into my CSS edits but got no result… was this the correct way to do it? If not can someone please explain this further to me? thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Theme: Catch Box] Featured Slider – Link to page?’ is closed to new replies.