Support » Plugin: Arconix Portfolio » Change URL

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Gardner

    (@jgardner03)

    Hi Kikobeats,

    Thanks for using my plugin. Add the following code to your theme’s functions.php file (anywhere after the opening <?php or before the closing ?>):

    // Change Arconix Portfolio rewrite slug
    add_filter( 'arconix_portfolio_post_type_args', 'my_custom_rewrite' );
    function my_custom_rewrite( $args ) {
    	$args['rewrite']['slug'] = 'MYCUSTOMPAGE';
    	return $args;
    }

    Just change MYCUSTOMPAGE to whatever you’d like.

    A word of caution — should you change or upgrade your theme in the future, you will lose this modification. If you do upgrade or change your theme, please copy the above code to the new (or upgraded) theme’s functions.php file.

    I tried this, it did not work for me. Did you change the name of the filter or something?

    Yep it changed, I used this:

    // Change Arconix Portfolio rewrite slug
    add_filter( 'arconix_portfolio_defaults', 'portfolio_custom_rewrite' );
    function portfolio_custom_rewrite( $args ) {
        $args['post_type']['args']['rewrite']['slug'] = 'projects-gallery';
        if(isset($_GET['debug'])) { echo '<pre>';var_export($args);exit; }
        return $args;
    }

    **also note you need to goto your permalinks settings page and just click the save button to clear permalinks cache. (/wp-admin/options-permalink.php)

    you may want to put this as an option instead of requiring PHP… it would take like 10 minutes to build and tag out

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change URL’ is closed to new replies.