Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #430910

    Hi,
    I am starting to create my portfolio. I noticed the slug (URL) has the blog category within it. Surely this is incorrect as the demo has it with the portfolio-item as the slug category.

    How do I remove the portfolio from being part of the blog and so it formats like this:

    domain/portfolio-item/casestudy-1

    Thanks
    Vince

    #431562

    Hey Vincent!

    You can setup a different permalink base to use in Dashboard > Settings > Permalinks. A base must be set though otherwise WordPress will not be able to differentiate between portfolio posts and your regular posts.

    Best regards,
    Elliott

    #431642

    HI,

    I already have it set-up with portfolio-item in the permalinks.

    The problem I am having is it is picking up /blog/ and appending it to the portoflio URL. This is wrong. I already have blog set-up in the blog section here: /blog/%category%/%postname%/ and do not want it in the URL of the portoflo section.

    Regards
    Vincent

    #432246

    Hey!

    So your custom permalink structure is set to, /blog/%category%/%postname%/ ? If so then that is where the problem is. It will add /blog/ to every URL. Your most likely just wanting /%postname%/.

    See here for how to setup your permalinks, https://codex.wordpress.org/Using_Permalinks.

    Best regards,
    Elliott

    #432683

    Hi,
    Thanks for your reply. Maybe I am not being clear here. I will explain a little better:

    The reason that I have /blog/%category%/%postname%/ is because I want all of the posts under blog to have the category blog disaplying in them to distinguish and seperate them from the pages that will have similar categories.

    For example:

    ON PAGES:
    domainname.com/services/marketing

    ON BLOG
    domainname.com/blog/marketing/hello-world

    If I remove %blog% from the URL it will become:

    BLOG:
    domainname.com/marketing/hello-world

    That’s a problem. It is something I need to sort out. Now this theme and it’s maker is pushing this framwork more towards a content management system and these are the kind of issues that you / he are going to be dealing with when it starts getting used more in a professional environment. So rather than sending me off to the stock WordPress site, can you or anyone else help in getting these URL’s to disaplay how I want them?

    #433240

    Hey!

    Add this in the functions.php file if you don’t to include the “blog” permalink for portfolio items:

    add_filter('avf_portfolio_cpt_args', 'avf_portfolio_cpt_args_mod');
    function avf_portfolio_cpt_args_mod($args) {
    	$args['rewrite'] = array('slug'=>_x($permalinks['portfolio_permalink_base'],'URL slug','avia_framework'), 'with_front'=>false);
    	return $args;
    }

    Go to Settings > Permalinks then click “Save” to flush the .htaccess.

    Best regards,
    Ismael

    #433333

    Hi Ismael,
    That is brilliant. I have been scratching my head trying to get the URL architecture right so it behaves more like a CMS. Thanks to your help the portfolio category is working perfectly now.

    Regards
    Vince

    #435954

    Hi!

    Please replace the code with this because the previous one will affect the portfolio base category:

    add_filter('avf_portfolio_cpt_args', 'avf_portfolio_cpt_args_mod');
    function avf_portfolio_cpt_args_mod($args) {
    	$args['rewrite']['with_front'] = false;
    	return $args;
    }

    Regards,
    Ismael

    #435988
    This reply has been marked as private.
    #436569

    Hey!

    When you replaced the code… did you flush or re-save the permalink settings? The previous one is wrong because the Permalinks > Portfolio Entry Settings will be useless. I tested the code on my installation and it works fine. Please try it again or just use the previous code if it works.

    Don’t forget to refresh the portfolio overview page before going to the actual portfolio item page.

    Cheers!
    Ismael

    #436665

    Hi Ismael,
    Okay, I updated and flushed and the portfolio setting it is now working as it should.
    A question: What is wrong using with using portfolio as the base and and the item and the categopry as an extension of the base like this:

    domain/portfolio/clients/john-doe

    Cheers
    Vince

    #438677

    Hey!

    Nothing at all. I just thought that if you want to use the native permalink settings (Permalinks > Portfolio Entry Settings), it will not work. If you don’t care about that then you are good to go.

    Cheers!
    Ismael

    #438831

    Hi Ismael,

    In portfolio section is it possible to have some portfolio entries as not linked to a page – rather it will be the thumbnail only? The only entries that will have a seperate page will be case studies.

    Thanks
    Vince

    • This reply was modified 5 years, 7 months ago by  Vincent.
    #439377

    Hey!

    Please post a link to your portfolio.

    Cheers!
    Josue

    #439622

    I have not put up the portfolio yet. I had/have a question:

    “In portfolio section is it possible to have some of the portfolio entries as not linked to a page – instead it will be the thumbnail only? The only entries that will have a linked page will be case studies.”

    Translated: Cans oem of the portfolio entries be statiuc and not pages just thumbnail images?

    #440269

    Hi!

    If you have any additional questions at this time we kindly ask that you open them up in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing. Concerning the question, edit the portfolio item then look for the Overwrite Portfolio Link setting then set it to Define Custom Link. Add the # (hash tag) symbol in the Link portfolio item to external URL field.

    Thanks!

    Cheers!
    Ismael

Viewing 16 posts - 1 through 16 (of 16 total)

The topic ‘Portfolio Slug’ is closed to new replies.