Tagged: enfold
-
AuthorPosts
-
December 18, 2014 at 4:55 pm #370048
I wanted to remove the anchor tag of the “Portfolio Item Title” via the child’d theme. Unfortunately the changes I made does not take effect. What approach should I take in order to make this work without having the parent’s theme edited. Any answers would much be appreciated.
Reference link:
https://kriesi.at/support/topic/portfolio-item-title/Code:
$output .= “<h2 class=’portfolio-preview-title entry-title’ $markup>“.$entry->post_title.”</h2>”;December 18, 2014 at 10:19 pm #370252Hi iwebware!
Download our child theme here, http://kriesi.at/documentation/enfold/downloads/, and then create a new folder in the child theme named “shortcodes” and then copy the portfolio.php shortcode file from Enfold into that folder and you can do the edit there.
Best regards,
ElliottDecember 22, 2014 at 11:14 am #371502Hi Elliott,
Thanks for the quick response. I followed your steps but it does not work at all. Any ideas? Tried creating this path for the portfolio but still no use /config-templatebuilder/avia-shortcodes/.
Caroline
- This reply was modified 10 years ago by iwebware.
December 22, 2014 at 9:43 pm #371817Hi!
You just need to paste the portfolio.php into the /shortcodes/ folder. You do not need to recreate the path as in the parent theme.
See here for more info, http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/. If you downloaded the child theme from our documentation then the required code is already inside the functions.php file.
Regards,
Elliott- This reply was modified 10 years ago by Elliott.
June 24, 2015 at 12:51 pm #463978Hello Elliot,
Thanks for the response.
I’ve put in the shorcodes folder and made a change to the functions.phpStill one question. The changes I want to make only have to be present with the category ‘Nieuws’
So the other portfolio items can remain the same. How can I make that work?Greets Jeen
June 26, 2015 at 3:30 pm #465020Hey!
You could try using this function, https://codex.wordpress.org/Function_Reference/get_the_terms, with the entry ID and check for a category.
Best regards,
ElliottJune 29, 2015 at 2:00 pm #465842Hello Elliott,
Thanks for the advise. I think I can maybe use some of the existing code withing the portfolio.php file.
Can’t I put a flag into the code so if the category is ‘nieuws’ of ‘Nieuws’ that i can use that flag elsewhere in the code?Gr. Jeen
June 30, 2015 at 11:11 am #466307Hi!
I’m sorry but what do you mean by “flag”? and ‘nieuws’ of ‘Nieuws’ ?
Best regards,
IsmaelJune 30, 2015 at 11:16 am #466313Hello Ismael,
Nieuws or nieuws are the titles of the category if got.
Nieuws is the name, nieuws is the slug.With a flag I mean a short peace of php code, for example
if(category == ‘Nieuws’)
{
$nieuws = 1
}When I can do that in a loop for every portfolio-item, i can use this code in the portfolio.php file
to alter the code that needs to be shown.For example:
if($nieuws ==1)
{
//put my new code here (for placing a button on the bottom of the news item
}Greets Jeen
July 2, 2015 at 1:56 pm #467483Hi!
you could try that and let us know if it’s working for you. If you need a developer for this job you can find one here: http://kriesi.at/contact/customization
Regards,
Andy -
AuthorPosts
- You must be logged in to reply to this topic.