- This topic has 15 replies, 3 voices, and was last updated 6 years, 9 months ago by Tom.
-
AuthorPosts
-
June 3, 2017 at 11:10 am #328142Eduardo
Hi,
I dont why, custom fiels are not showed in posts with your template.
I use Advanced Custom Fiels plugins and its worked perfect with my previous template before installing yours.June 3, 2017 at 11:16 am #328144LeoStaffCustomer SupportHi there,
Just tested and it’s working for me.
Did you create a Custom Field group within the plugin as #3 here?
https://en-ca.wordpress.org/plugins/advanced-custom-fields/#installationThen it should appear on the page / post / template as #4 suggested:
https://en-ca.wordpress.org/plugins/advanced-custom-fields/#installationJune 9, 2017 at 1:24 am #330917EduardoHi, Everything its ok.
If i change the template I can see the custom fields on Post but not with your template.
Please, tell me something because clients are calling me.
You can check it, for example here: http://www.guia-clubs.com/club-amor-secreto-valencia/
ThanksJune 9, 2017 at 1:26 am #330918EduardoThis is the code whith your theme:
<div class="site-content"> <div class="content-area grid-parent mobile-grid-100 push-25 grid-75 tablet-push-25 tablet-grid-75"> <main id="main" class="site-main"> <article id="post-1525" class="post-1525 post type-post status-publish format-standard has-post-thumbnail hentry category-clubs-alterne-spain" itemtype="http://schema.org/CreativeWork" itemscope="itemscope"> <div class="inside-article"> <header class="entry-header"> <h1 class="entry-title" itemprop="headline">CLUB AMOR SECRETO – VALENCIA</h1> <div class="entry-meta"> </div> </header> <div class="page-header-image-single page-header-below-title grid-container grid-parent generate-page-header"> <img src="http://www.guia-clubs.com/wp-content/uploads/2017/05/puticlub-amor-secreto-valencia.jpg" alt="Club Amor Secreto Valencia" width="650" height="463" /> </div> <div class="entry-content"> <p>Nuestro objetivo es lograr que usted viva experiencias únicas, sus momentos ‘Amor Secreto’, de la forma más cómoda. Conoce a las mejores escorts deluxe y nuestros servicios complementarios al de acompañamiento. Siempre en un marco de confianza y discreción.</p> <div class="adsb30"> <style> </div> <footer class="entry-meta"> </div> </article> <div class="comments-area"> </main> </div>
June 9, 2017 at 1:29 am #330919EduardoAnd this is the code with another template (hotec):
<div class="page-wrapper twelve columns page-wrapper-left-sidebar b0"> <div class="row"> <div class="twelve columns b0"> <div class="page-title-wrapper"> <h1 class="page-title left">+ INFORMACIÓN Y COMENTARIOS</h1> <div class="page-title-alt right"></div> <div class="clear"></div> </div> </div> </div> <div class="row"> <div class="content-wrapper eight columns b0"> <div class="post-heading"> <h1 class="blog-title"> CLUB AMOR SECRETO – VALENCIA </h1> <div class="blog-meta"> <span class="blog-date"> <span class="blog-author"> <span class="blog-comment"> <span class="blog-category"> </div> <p>Dirección: Calle de la Iglesia del Rosario, 18, Valencia, España</p> <p>Teléfono: 963 242 696 y 636 473 976</p> </div> <div class="page-content"> <div class="page-single-element"> <p class="page-tags"> </p> <div class="clear"></div> <br> <div> <h3 id="comments" class="meta"> <div> </div> </div> </div> <div class="left-sidebar-wrapper four columns b0"> <div class="clear"></div> </div> </div> <div class="clear"></div> </div> </div>
June 9, 2017 at 10:25 am #331143TomLead DeveloperLead DeveloperHow are you trying to add the custom field into the template?
June 9, 2017 at 1:14 pm #331235EduardoPlease, tell me how can I do it.
As I tell you, with other templates, custom fields works OK.
ThanksJune 10, 2017 at 12:28 am #331403EduardoFixed.
I wrote on Hook Afer Entry Title:
<br>
<p><b>Dirección: </b><?php the_field(‘telefono’); ?><br>
<b>Teléfono: </b><?php the_field(‘direccion’); ?></p>
And now custom fiels are showed on post/entries.
Please tell me if you think this code its ok or maybe you would add or change something to work better.
ThanksJune 10, 2017 at 12:29 am #331404TomLead DeveloperLead DeveloperI’m not sure exactly what you’re trying to do.
What are you trying to insert? Where are you wanting it to show up?
If you’re trying to add custom fields into the template, you’ll likely need to use the hook system: https://docs.generatepress.com/collection/hooks/
June 10, 2017 at 12:29 am #331405TomLead DeveloperLead DeveloperHa! Beat me to it. Looks good 🙂
June 10, 2017 at 12:39 am #331414EduardoNow I saw a problem.
I want show custom fields just on Post/Entries but, now, custom fields are showed on Pages too.
Please, can you tell me howcan I fis this problem?
ThanksJune 10, 2017 at 12:40 am #331416TomLead DeveloperLead DeveloperTry this:
<?php if ( is_single() ) { ?> Stuff in here will show on single posts only. <?php } ?>
June 10, 2017 at 1:22 am #331428EduardoPerfect!
One more thing. How can I hide nav post navigation on posts?
ThanksJune 10, 2017 at 9:09 am #331604TomLead DeveloperLead DeveloperTry this:
.post-navigation { display: none; }
June 11, 2017 at 2:50 am #331887EduardoThanks
-
AuthorPosts
- You must be logged in to reply to this topic.