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

Pass custom text into view using shortcode.

$
0
0

I have created a view for a content type I have created called projects. The projects content type has two taxonomys – Status ( terms – Current and Past) and Location (terms – North, East, South, West). I have created a filter on the view using shortcode, so that a user can insert the view in a page that is relevant to a location and a status.

My intention is that I want to be able to insert a custom title into the view. My reason being, the view has addition html and I want the title to appear within that html. I know I could write the title before inserting the view shortcode, but that means the title will not be wrapped within the html of the view.

My view shortcode is currently this;

[wpv-view name="Projects" location="North" status="Current"]

I guess what I am after is this;

[wpv-view name="Projects" location="North" status="Current" custom_text="Projects in the North"]

So for that particular view, it will insert the text 'Projects in the North' before the view loop to act as the title.

Is this possible to do?


Viewing all articles
Browse latest Browse all 20145

Trending Articles