WordPress.org

Ready to get started?Download WordPress

Forums

Arconix Portfolio
[resolved] Change URL (5 posts)

  1. Kikobeats
    Member
    Posted 1 year ago #

    Hello,

    The plugin works, but I need custom url for individual items

    by default, the url for individual items is:
    http://domain.com/portfolio/item1

    I need this:
    http://domain.com/MYCUSTOMPAGE/item1

    how I make this?

    http://wordpress.org/extend/plugins/arconix-portfolio/

  2. John Gardner
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Seth Carstens
    Member
    Posted 10 months ago #

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

  4. Seth Carstens
    Member
    Posted 10 months ago #

    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)

  5. Seth Carstens
    Member
    Posted 10 months ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags