Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1133856

    Hi,

    I want to change the content of the portfolio category pages.
    I am using a child theme.

    I have seen in wp-content/themes/enfold/enfold/taxonomy-portfolio_entries.php that you call
    get_sidebar('portfolio');
    So I tried registering a sidebar called ‘portfolio’ in the child functions.php like so:

    # Add an editable sidebar for Portfolio
    add_action( 'widgets_init', 'portfolio_register_sidebar' );
    function portfolio_register_sidebar(){
      register_sidebar(array(
      'name' => 'Portfolio sidebar',
      'id' => 'portfolio',
      'description' => 'Sidebar for Portfolio',
      'before_widget' => '<aside id="%1$s" class="widget group %2$s">',
      'after_widget' => '</aside>',
      'before_title' => '<h3 class="widget-title">',
      'after_title' => '</h3>',
      ));
     }

    Then in the widgets area, I added some custom HTML stuff, but I still get the standard sidebar with pages, categories and archives.

    Please point me in the right direction.

    Thanks,

    John

    #1134932

    If anyone is interested, I figured this out.

    Copy the sidebar.php file from the enfold director to your child directory

    Edit the file, and at line 88 add this code BEFOR the closing curly bracket:

    // Portfolio Categories page 
    if ($avia_config['currently_viewing'] == 'portfolio' && dynamic_sidebar('portfolio') ) : $default_sidebar = false; endif;

    REMEMBER to add a sidebar called ‘portfolio’ in the child functions.php as shown in original post

    Thanks for your lightning response Kriesi support team :thumbsdown:

    • This reply was modified 5 years, 7 months ago by JohnLander.
    #1135358

    Hi JohnLander,

    Glad you got it working for you and thank you for sharing! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.