Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1272039
    Sandra
    Participant

    Hi there,

    I spent hours trying various options, but now decided that I need your help.

    I would like to display taxonomies based on my categories in my custom posts (done!) and would need them to be clickable to display related posts (my question).

    The client would select the taxonomy tags (and not the related posts), just like when using the normal WP posts.

    Here is what I used so far:

    $categorie_terms = get_field( 'categorie' ); 
    
    (...)
    
    <h5>Domaines</h5>
    <?php if ( $categorie_terms ): ?>
    	<?php foreach ( $categorie_terms as $categorie_term ): ?>
    		<div style="color:#848484"><?php echo $categorie_term->name; ?></div>
    	<?php endforeach; ?>
    <?php endif; ?>

    And the link to the page https://pmetools.ch/archives/realisations/ciip

    Of course, it would be nicer to display them next to each other and ideally within the CS shortcode πŸ™‚ (tried but got a PHP error).

    Thanks a lot and best wishes,

    Sandra

    Attached my field definition

    #1272054
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    You may update your code to this,

    $categorie_terms = get_field( 'categorie' ); 
    
    (...)
    
    <h5>Domaines</h5>
    <?php if ( $categorie_terms ): ?>
    	<?php foreach ( $categorie_terms as $categorie_term ): ?>
    		<a href="<?php echo get_term_link( $categorie_term ->term_id ); ?>"><div style="color:#848484"><?php echo $categorie_term->name; ?></div></a>
    	<?php endforeach; ?>
    <?php endif; ?>

    Hope this helps.

    #1272073
    Sandra
    Participant

    Hi Rad,

    Thanks a lot.

    Just a quickie: my font “Muli” is displaying when I am in the customizer but not when displayed separately . Here my css:

    .single-realisations .x-container {
    font-family: ‘Muli’ !important; color: #848484;}

    Thanks

    #1272111
    Thai
    Moderator

    Hi There,

    Please find this CSS:

    .single-realisations .x-container{body{font-family:'Muli' !important;color:#848484}

    And change to this:

    .single-realisations .x-container{font-family:'Muli' !important;color:#848484}

    Hope it helps πŸ™‚

    #1272143
    Sandra
    Participant

    Thanks, Thai.

    Unfortunately it doesn’t help as I must be doing something wrong πŸ™

    Styles display correctly in customizer but not on the proper site (see attachment).

    Please note that I added the the custom post styles to the global CSS using .single-realisations (just double-checked my file names).

    Thanks πŸ™‚

    #1272161
    Thai
    Moderator

    Hi There,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link login to your site
    – WordPress Admin username / password

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

    Thanks.

    #1272178
    Sandra
    Participant
    This reply has been marked as private.
    #1272288
    Sandra
    Participant

    Hi Thai,

    Really sorry to bother you with the first topic I submitted, … but actually the tags are not doing their job: they are not linking to other custom posts with the same taxonomy. See https://pmetools.ch/archives/realisations/du-groupe-a-lequipe-pour-plus-defficacite-organisationnelle

    Thanks πŸ™‚

    Sandra

    #1272419
    Rad
    Moderator

    Hi there,

    The password is incorrect, would you mind providing your FTP login credentials as well? We can’t do editing in admin, any mistake will put your site down. With FTP, we can just restore it right away.

    Thanks!

    #1272849
    Sandra
    Participant
    This reply has been marked as private.
    #1273008
    Rad
    Moderator

    Hi there,

    Thanks! But unfortunately, I’m not sure where your custom code is added. I could only check it through FTP, please provide the FTP login credentials as well. Unless you added it within WordPress admin? Please provide a guide on how to re-create/reproduce it.

    Thanks!

    #1273061
    Sandra
    Participant
    This reply has been marked as private.
    #1273189
    Rad
    Moderator

    Hi Sandra,

    May I know to which file the code is implemented? I couldn’t find it, and navigating from the different path is slow as the loading is taking longer on my end. It should be faster with FTP πŸ™‚

    Thanks!

    #1273211
    Sandra
    Participant

    Hi Rad,

    Of course! It is in wp-single-realisations.php. I also altered single-realisations.php and content-realisation.php. Haven’t touched any other file such as style.css or functions.php. This was my reference https://community.theme.co/forums/topic/using-cornerstone-to-create-custom-post-type-page-template/ πŸ™‚

    CHeers,

    Sandra

    #1274192
    Rad
    Moderator

    Hi Sandra,

    Are you sure it’s the correct folder or files. I tried adding this line

    <?php echo "test"; ?>

    And deactivated the plugins and it’s not even displaying or taking effect.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1272039 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>