Portfolio for Pro

Hello

I have a portfolio page that is working the way I want in X theme. I would like to replicate the same functionality in Pro.

Here is the working page in X:
edgeephotography.com/portfolio

This is a thread that once helped getting that page working:

Here is the code I use in X:

    /*replace custom portfolio item links*/
    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) {
    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;
    }
    /*randomize portfolio images*/
    function cmk_custom_order( $wp_query ) {
         /* Get the post type from the query*/
        if (isset($wp_query->query['post_type'])) {
        	$post_type = $wp_query->query['post_type'];

        	/*If Post type is Portfolio*/
        	if ( $post_type == 'x-portfolio') {
       		/* Set Order to Random*/
    		$wp_query->set('orderby', 'rand');
        	/* un-comment if not using random order */
        	//$wp_query->set('order', 'DESC');
        	}
        }
    }
    /* Change Order settings before displaying the Postype*/
    add_filter('pre_get_posts', 'cmk_custom_order');

    /* change page titles */
    function x_wp_title( $title ) {

        if ( is_front_page() ) {
          return trim( $title ) . get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' );
        } elseif ( is_feed() ) {
          return trim( $title ) . ' | RSS Feed';
        } else {
          return trim( $title ) . ' | ' . get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' ); 
        }

      }
      add_filter( 'wp_title', 'x_wp_title' );

How do I get this same functionality in Pro?
Thank you!

Hello @johnnyp14,

Thanks for writing in!

Please be advised that the Pro theme is still the X theme with the addition of the header, footer and the layout builder. If ever you built your site with the X theme including some of the custom PHP codes, all of those custom codes should also work when your upgrade to the Pro theme. That means to say that the same code above will also work with the Pro theme.

Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third party developer.

Best Regards.

Awesome, thank you for the confirmation. I added some portfolio elements and do see them show up now. I think the reason I did not see them at first was due to my first section being behind my header, so I didn’t see the filter buttons. Any way to make sure that page content starts after the header?

Hello @johnnyp14,

Your site is under construction we cannot check the page. To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Sent, thank you!

Hello @johnnyp14,

Please edit your header and make sure that the initial position of your bar is set to “Relative”.
Screen Shot 2021-03-08 at 10.42.31 AM

Kindly let us know how it goes.

Much better. Thank you!

Hi @johnnyp14,

You’re welcome and it’s our pleasure to help you. If you have any other concerns regarding our theme features, feel free to reach us.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.