Im kinda new to PHP so bear with me.
Im building a site for my uncle using the Fluxus Theme in Wordpress. He's an artist, his art is displayed in the following order:
Menu
Category1
--Actual Art
--Actual Art
Category2
Category3
Category4
On his Actual Art page I want to create a link that goes back to the page where all the categories are shown. I've achieved the back link using href="../"
What I want is this to show
<a href="../">Go back to (Insert category of post here)</a>
So if the post has the project type: Funny art, it has to show "Go back to Funny art" and so on for every category.
What I have so far.
<aside class="widget widget-project-custom-info">
<div class="decoration"></div>
<h3 class="widget-title"><a href="../">Go back to <?php echo $project_type; ?></a>
</aside>
$project-type , which is the category, doesn't want to show.
How can I achieve this? Again, im new to PHP and trying my best to understand this beautiful language.
Thanks In advance
Edit:
pastie.org/private/morjv8z3uiiwzhbb6wt0zq , this is the code from the project-type.php page? That might be useful? As the value for $project-type isn't called on the artwork page.
function get_back_link() { if ( $this->meta_back_to_link ) { $project_type = get_term( $this->meta_back_to_link, 'fluxus-project-type' ); if ( $project_type ) { return get_term_link( $project_type, 'fluxus-project-type' ); } } return fluxus_get_default_portfolio_permalink(); }
– ginobrugman Nov 20 '15 at 18:51