Image and description only on main page / hook into template files
Quote from Magma on January 29, 2018, 11:25 amThe page which has the shortcode [forum] also has an image and a description. How do I prevent to display both on other pages within the forum?
main page: image + description + [forum]
any other page of the forum: [forum]Is there a way to hook into the template files like this?
forum.php
forum-category.php
forum-single.php
The page which has the shortcode [forum] also has an image and a description. How do I prevent to display both on other pages within the forum?
main page: image + description + [forum]
any other page of the forum: [forum]
Is there a way to hook into the template files like this?
forum.php
forum-category.php
forum-single.php
Quote from Yworld on January 29, 2018, 11:35 amHi Magma
Add the following code to your themes functions.php file
function FunctionOverviewTop() { echo 'your code'; } add_action('asgarosforum_overview_custom_content_top', 'FunctionOverviewTop');
Hi Magma
Add the following code to your themes functions.php file
function FunctionOverviewTop() { echo 'your code'; } add_action('asgarosforum_overview_custom_content_top', 'FunctionOverviewTop');
Quote from Asgaros on January 30, 2018, 12:43 pmHello Magma,
I am glad to hear that the above posted code is working for you. If you need different outputs for different views one day, you can just modify the view-part in the hook-call:
- asgarosforum_overview_custom_content_top for overview
- asgarosforum_forum_custom_content_top for the forum-view
- asgarosforum_profile_custom_content_top for the profile-view
- and so on …
You can see the identifier of the actual view in the URL inside the view-parameter, for example:
https://asgaros.com/support/?view=profile&id=1
Hello Magma,
I am glad to hear that the above posted code is working for you. If you need different outputs for different views one day, you can just modify the view-part in the hook-call:
- asgarosforum_overview_custom_content_top for overview
- asgarosforum_forum_custom_content_top for the forum-view
- asgarosforum_profile_custom_content_top for the profile-view
- and so on …
You can see the identifier of the actual view in the URL inside the view-parameter, for example:
https://asgaros.com/support/?view=profile&id=1