Tagged: x
-
AuthorPosts
-
November 27, 2016 at 5:17 am #1272039
SandraParticipantHi 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
November 27, 2016 at 5:32 am #1272054
RadModeratorHi 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.
November 27, 2016 at 6:18 am #1272073
SandraParticipantHi 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
November 27, 2016 at 7:59 am #1272111
ThaiModeratorHi 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 π
November 27, 2016 at 9:26 am #1272143
SandraParticipantThanks, 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 π
November 27, 2016 at 9:46 am #1272161
ThaiModeratorHi 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 / passwordDonβt forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
November 27, 2016 at 10:11 am #1272178
SandraParticipantThis reply has been marked as private.November 27, 2016 at 12:03 pm #1272288
SandraParticipantHi 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
November 27, 2016 at 3:42 pm #1272419
RadModeratorHi 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!
November 28, 2016 at 1:13 am #1272849
SandraParticipantThis reply has been marked as private.November 28, 2016 at 4:41 am #1273008
RadModeratorHi 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!
November 28, 2016 at 5:43 am #1273061
SandraParticipantThis reply has been marked as private.November 28, 2016 at 8:26 am #1273189
RadModeratorHi 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!
November 28, 2016 at 8:41 am #1273211
SandraParticipantHi 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
November 29, 2016 at 12:18 am #1274192
RadModeratorHi 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!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1272039 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
