-
AuthorPosts
-
January 20, 2016 at 1:56 am #754429
Hello Caleb,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
January 20, 2016 at 3:17 pm #755650This reply has been marked as private.January 20, 2016 at 10:11 pm #756252Hi Caleb,
This thread is about adding custom links to portfolio items through project link. I checked your portfolio items and there are no added project links. It should be under your portfolio item settings when editing it.
And this code is not even added as suggested,
jQuery(function($){ $('.page-template-template-layout-portfolio-php .x-portfolio a').attr('target','_blank') });
Please add that code at your customizer’s custom javascript.
Thanks!
January 20, 2016 at 10:53 pm #756310X Staff,
I understand what the thread is about, as I have only just started switching over my portfolio items to custom pages I haven’t had the chance to do all of the portfolio items. The reason I did not add that code was because as stated in thread, this just opens the portfolio item in a new tab. Which does not fix my problem. I probably should have been more specific about which items I have set up properly. The first few items of my ‘Arts & Design’ portfolio have been setup properly, specifically the following portfolio items ‘bugs’, ‘light cube’, ‘unleashed’, ‘energy paths’ and ‘streaks of fire’. However, only ‘bugs’ and ‘light cube’ work properly, the other portfolio items only reload the page. Sorry for not being clearer before, and thank so much for your support.
Thanks,
Caleb
January 20, 2016 at 11:44 pm #756381Hi Caleb,
Thanks for updating the thread!
Please try replacing the custom code you’ve added in your child theme’s functions.php file from this thread, with this:
add_filter( 'post_type_link', 'x_remap_portfolio_permalink_to_project_link', 10, 4); function x_remap_portfolio_permalink_to_project_link($post_link, $post, $leavename, $sample) { GLOBAL $post; if ('x-portfolio' == $post->post_type) { $custom = get_post_custom($post->id); if (isset($custom['_x_portfolio_project_link']) && $custom['_x_portfolio_project_link'][0]!='') return $custom['_x_portfolio_project_link'][0]; } return $post_link; }
Let us know how it goes.
Thank you!
January 21, 2016 at 1:19 am #756441X Staff,
Unfortunately that did not solve the problem.
Thanks
January 21, 2016 at 1:47 am #756457Hello There,
Please edit each of the portfolio items. You have to make sure that each of the portfolio items has a custom project link. I have logged and checked Japan Dreaming for example. The project link is just
#demo
and this will not have any effect and will only reload the page.Please keep in mind that in order for the custom code we gave to work, you have to create a corresponding page to each of your portfolio items and that each of these items has a custom project link which is the custom page.
Hope this would help.
January 21, 2016 at 3:52 am #756597Hi,
If you had read my previous post, you would have seen that I had not changed or setup all of the portfolio items yet. But I have setup some portfolio items with the changed and corrected project links as mentioned in the post to no avail. The attach image, you’ll be able to see that I have changed the project links to the link of the custom page, however when viewing the portfolio it just reloads the page. However, this is not the case for other portfolio items, mentioned in a previous post.
Thanks,
January 21, 2016 at 6:31 am #756785Hi there,
Thanks for the clarification!
Yes, I can see that links are only working on the first two portfolio items and not for the 3rd one. Upon looking at the source, I can see that the link is not defined at all (in the front-end of site only) and that’s why it’s reloading the same page (see: http://prntscr.com/9swosu). In this case, kindly open a separate thread and provide us with your URL, WordPress admin login and FTP login credentials in a private reply. You can do that by creating a new reply in your new thread and then selecting Set as private reply below the reply box.
Thank you!
March 11, 2016 at 3:27 pm #834073EDIT: Sorry, wrong topic 🙁 I deleted my comment
March 11, 2016 at 7:55 pm #834312No problem 🙂
-
AuthorPosts