Tagged: Portfolio
-
AuthorPosts
-
December 4, 2018 at 7:48 pm #1040884
Is there a way to change the output (“NOTHING FOUND – Sorry, no posts matched your criteria”) when there are no portfolio entries in the blog posts block?
December 4, 2018 at 8:31 pm #1040918Hey leviticus,
Try to edit it in enfold > includes > loop-index.php (line 370):
<p class="entry-content" <?php avia_markup_helper(array('context' => 'entry_content')); ?>><?php _e('Sorry, no posts matched your criteria', 'avia_framework'); ?></p>
You can override this in a child theme, just create an includes folder and add loop-index.php file.
Hope this helps.Best regards,
NikkoDecember 5, 2018 at 5:22 pm #1041300So I got the child theme to recognize the new loop-index.php. How can I target a specific response for just the Portfolio items that have the Employment category?
Here’s what I have so far:
<article class="entry"> <?php if ( 'portfolio' == get_post_type() && in_category( '46' ) ) { ?> <p class="entry-content" <?php avia_markup_helper(array('context' => 'entry_content')); ?>><?php _e('There are no year-round employment opportunities available at this time. Please check back again soon!', 'avia_framework'); ?></p> <footer class="entry-footer"></footer> <?php } else { ?> <header class="entry-content-header"> <h2 class='post-title entry-title'><?php _e('Nothing Found', 'avia_framework'); ?></h2> </header> <p class="entry-content" <?php avia_markup_helper(array('context' => 'entry_content')); ?>><?php _e('Sorry, no posts matched your criteria', 'avia_framework'); ?></p> <footer class="entry-footer"></footer> <?php } ?> </article>
December 6, 2018 at 4:28 pm #1041719Hi leviticus,
The code seems fine, if it’s not working, can you try to check if it satisfies both condition?
Maybe you can also use has_category https://codex.wordpress.org/Function_Reference/has_categoryBest regards,
NikkoDecember 7, 2018 at 6:30 pm #1042146I tried using just
<?php if ( 'portfolio' == get_post_type() ) { ?>
and it still wouldn’t pull in the custom “not found.” Any ideas?December 10, 2018 at 4:58 pm #1043164Hi leviticus,
Do you have a caching plugin enabled? it might be preventing the changes from being displayed.
Also I just want to clarify if this is on a single portfolio page?Best regards,
NikkoDecember 11, 2018 at 7:57 pm #1043952No caching enabled, cleared my local cache and does find the new loop-index.php, but not pulling in the specific “if portfolio” variable.
The portfolio items are being pulled in from the Blog Posts content element block on a page. So, not the default portfolio archive from the theme. (If that’s what you were asking?)
December 12, 2018 at 10:52 am #1044246Hi leviticus,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
NikkoDecember 13, 2018 at 6:06 pm #1044960Thanks so much. Details provided in private content area.
December 15, 2018 at 5:24 pm #1045677Hi leviticus,
I tried logging in with the credentials you gave however it didn’t work, please check.
Best regards,
NikkoDecember 17, 2018 at 5:56 pm #1046399Sorry about that. This should work.
December 19, 2018 at 11:43 pm #1047479Hi leviticus,
I apologize for the delayed response.
Can we ask for ftp access also? I thought Appearance > Editor was available in the WP dashboard so we can try to check and test it.
Just post the credentials in private content.Best regards,
NikkoDecember 20, 2018 at 5:00 pm #1047791Here you go
December 21, 2018 at 3:25 pm #1048203Hi leviticus,
I have replaced this code you have:
<?php if ( 'portfolio' == get_post_type() && in_category( '46' ) ) { ?>
to:
<?php if ( 'portfolio_entries' == $taxonomy && 46 == $term_id ) { ?>
Let us know if you need further assistance.
Best regards,
NikkoDecember 22, 2018 at 11:31 pm #1048717Thank you so much! I really appreciate your help on this.
December 23, 2018 at 8:47 pm #1048877Hi leviticus,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.