Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #166006

    Carter H
    Participant

    Hi – I need the Prev/Next arrows on a single post to link to other posts in its category. Do not want them to link to a ‘previous’ post. Can’t find where to change this – in functions or elsewhere….

    http://carterhodgkin.com/closeup_burst22/

    Is this what I need to add: <?php next_post_link( ‘%link’, ‘Next post in category’, TRUE ); ?>
    And same with “Previous”?
    If so, Where?
    thanks!
    Carter

    #166269

    Kosher K
    Member

    Hi There,

    You can use x_entry_navigation() function.

    Or use the default wordpress navigation function

    http://codex.wordpress.org/Function_Reference/posts_nav_link
    http://codex.wordpress.org/Function_Reference/next_post_link
    http://codex.wordpress.org/Function_Reference/previous_posts_link

    Hope that helps,

    Cheers

    #168501

    Carter H
    Participant

    Hi – My problem is that I can’t find where to make this change. Between ‘global’ & ‘views’, there are so many files. Where do I make this change?????
    thanks

    #168835

    Christopher
    Moderator

    Hi there,

    You can copy _content-post-header.php file from YOUR THEME -> framework -> views -> Integrity and put it in the same path inside child theme and modify it.

    Hope it helps.

    #173084

    Carter H
    Participant

    Hi there: I certainly appreciate your timely replies. The one above alerted me to the fact that I did not have the *latest updated version*. So I updated.

    Subsequently I watched the Portfolio tutorial and realize that’s what I need to use.
    My site: http://carterhodgkin.com/

    Now I have 2 other issues.
    1) I have tried to change the portfolio archive heading and it says it will not update. See: Isotopes:http://carterhodgkin.com/portfolio-item-category/isotopes/
    I don’t understand why.

    2) I want to remove the white box background underneath images on the single posts (i.e. ‘entry wrap’).

    I open the Integrity CSS file in Sublime 2, DW-CS6 & Textmate. None of the CSS is displaying properly in these programs. It’s all run-in text. Same thing with the CSS of other stacks. Not sure why????

    Thanks again for your attention to these issues!!
    thanks,
    Carter

    #173221

    Paul R
    Moderator

    Hi Carter,

    1. To change the archive headings, you can simple add an Archive Title and Archive subheading for each category.

    http://screencast.com/t/48dsDSsS3

    2. We have minimized the css files to improve load time performance.
    To remove the white box background, you can add this under Custom > CSS in the Customizer.

    
    body .entry-wrap {
         background:transparent;
         box-shadow:none;
    }
    

    Hope that helps.

    #173656

    Carter H
    Participant

    Hi – thanks again. Re: the archive headings, I did that and it wouldn’t update. It’s ok. I made a page instead.

    The arrows still won’t direct to posts within the same category ONLY. I have tried again to change the _content-post-header.php file. I put it in:
    x-child-integrity-light>views>integrity. I can’t get it to work. I tried using:
    <?php next_post_link( ‘%link’, ‘Next post in category’, TRUE ); ?>
    <?php previous_post_link(‘%link’, ‘Previous in category’, TRUE); ?>

    Not exactly sure where to place the php. Please suggest correct code for this. I’ve been able to change it in other themes. Driving me crazy! thanks.

    Here’s the file:
    <?php

    // =============================================================================
    // VIEWS/INTEGRITY/_CONTENT-POST-HEADER.PHP
    // —————————————————————————–
    // Standard <header> output for various posts.
    // =============================================================================

    ?>

    <header class=”entry-header”>

    <?php next_post_link( ‘%link’, ‘Next post in category’, TRUE ); ?>
    <?php previous_post_link(‘%link’, ‘Previous in category’, TRUE); ?>

    <?php if ( is_single() ) : ?>
    <h1 class=”entry-title”><?php the_title(); ?></h1>
    <?php else : ?>
    <h2 class=”entry-title”>

    ” title=”<?php echo esc_attr( sprintf( __( ‘Permalink to: “%s”‘, ‘__x__’ ), the_title_attribute( ‘echo=0’ ) ) ); ?>”><?php x_the_alternate_title(); ?>
    </h2>

    <?php endif; ?>
    <?php x_integrity_entry_meta(); ?>
    </header>

    #173838

    Darshana
    Moderator

    Hi there,

    Did you create a Child Theme and make the changes as instructed above? Would you mind providing us with your login credentials so that we can check your current setup? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #174326

    Carter H
    Participant
    This reply has been marked as private.
    #174465

    Zeshan
    Member

    Hi there,

    We’re sorry for the confusion!

    It seems you want to add the links to the portfolio items while the above provided files paths are for blog posts. To achieve this for the portfolio items, please copy the file wp-content/themes/x/framework/views/integrity/content-portfolio.php in your child theme’s folder /framework/views/integrity/. After that you can add your code anywhere in between line no. 19 and 34 (see: http://prntscr.com/5n7rhz).

    Thanks!

    #175893

    Carter H
    Participant

    Hello: I’m confused as to what code to put where in this file. Can you please assist? Again, I need each image in the portfolio (category) to link to its category and no other. Thanks, Carter

    <?php

    // =============================================================================
    // VIEWS/INTEGRITY/CONTENT-PORTFOLIO.PHP
    // —————————————————————————–
    // Portfolio post output for Integrity.
    // =============================================================================

    $archive_share = x_get_option( ‘x_integrity_portfolio_archive_post_sharing_enable’, ” );

    ?>

    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <div class=”entry-featured”>
    <?php x_portfolio_item_featured_content(); ?>
    </div>
    <div class=”entry-wrap cf”>

    <?php if ( x_is_portfolio_item() ) : ?>

    <div class=”entry-info”>
    <header class=”entry-header”>
    <h1 class=”entry-title entry-title-portfolio”><?php the_title(); ?></h1>
    <?php x_integrity_entry_meta(); ?>

    </header>
    <?php x_get_view( ‘global’, ‘_content’, ‘the-content’ ); ?>
    </div>
    <div class=”entry-extra”>
    <?php x_portfolio_item_tags(); ?>
    <?php x_portfolio_item_project_link(); ?>
    <?php x_portfolio_item_social(); ?>
    </div>

    <?php else : ?>

    <header class=”entry-header”>
    <h2 class=”entry-title entry-title-portfolio”>
    ” title=”<?php echo esc_attr( sprintf( __( ‘Permalink to: “%s”‘, ‘__x__’ ), the_title_attribute( ‘echo=0’ ) ) ); ?>”><?php x_the_alternate_title(); ?>
    </h2>
    <?php if ( $archive_share == ‘1’ ) : ?>
    <?php x_portfolio_item_social(); ?>
    <?php endif; ?>
    </header>

    <?php endif; ?>

    </div>
    </article>

    #176347

    Rad
    Moderator

    Hi there,

    I just re-read the discussion but I’m not really sure of what you’re trying to achieve.

    Do you linking the items here http://carterhodgkin.com/isotopes/ to specific category page of portfolio?

    If yes, then you can actually create pages with “Layout – Portfolio” template and category filter.

    Example, create a page named “Audio”, then choose “Layout – Portfolio” template under Page Attribute Section. And under Portfolio Settings > Category Select
    , choose category “Audio”. Now get the resulting page url (eg. http://domain.com/audio/)

    Install 3rd party plugin called “Page Links to” and edit the item that are displaying at http://carterhodgkin.com/isotopes/. Then add the url http://domain.com/audio/ at “page links to” section and your current item will link to it.

    Hope this helps.

    #180507

    Carter H
    Participant
    This reply has been marked as private.
    #180906

    Rad
    Moderator

    Hi Carter,

    Okay 🙂 then let’s do this.

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    1. Copy _breadcrumbs.php from /x/framework/views/integrity/ to you child theme (eg /x-child-integrity-light/framework/views/integrity/ )

    2. Edit your child theme’s _breadcrumbs.php and replace this code.

    $prev_post = get_adjacent_post( false, '', false );
    $next_post = get_adjacent_post( false, '', true );

    With this,

    $by_tax = x_is_portfolio_item() ? true : false;
    $prev_post = get_adjacent_post( $by_tax, '', false );
    $next_post = get_adjacent_post( $by_tax, '', true );

    3. Save and upload.

    Cheers!

    #181320

    Carter H
    Participant

    Hello again!
    Uh, guess what? The code you suggest I replace is not in my _breadcrumbs.php file. I can’t find that code in any of the other VIEWS/Integrity files either.

    Here’s the _breadcrumbs.php code:
    <?php

    // =============================================================================
    // VIEWS/INTEGRITY/_BREADCRUMBS.PHP
    // —————————————————————————–
    // Breadcrumb output for Integrity.
    // =============================================================================

    ?>

    <?php if ( ! is_front_page() ) : ?>
    <?php if ( x_get_option( ‘x_breadcrumb_display’, ‘1’ ) == ‘1’ ) : ?>

    <div class=”x-breadcrumb-wrap”>
    <div class=”x-container-fluid max width cf”>

    <?php x_breadcrumbs(); ?>

    <?php if ( is_single() || x_is_portfolio_item() ) : ?>
    <?php x_entry_navigation(); ?>
    <?php endif; ?>

    </div>
    </div>

    <?php endif; ?>
    <?php endif; ?>

    _____________________________________________________________

    Please help!
    thanks!