Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Pass category slug to view in php

$
0
0

I am trying to show a view via php and have it working if I hardcode the slug of the category, but I would like to pass this programitically. I do not know php well but here is what I attempted:

<?php 
$cat = get_query_var('cat');
$yourcat = get_category ($cat);
echo render_view(array('title' => 'Sponsored-Vendors-Category' , 'category' => '. $yourcat->slug;')); ?>

Is there a way to get the slug and put it in the second part such as:
'category' => 'slug-goes-here'

Thanks


Viewing all articles
Browse latest Browse all 20145

Trending Articles