-
AuthorPosts
-
August 4, 2022 at 3:38 pm #1360649
Hello,
how do i make the custom field “adress” visible below the content of a blogpost?
– I will not use any plugins
– i have a child theme in chargekind regards
Eva SimoneAugust 4, 2022 at 8:32 pm #1360703Hey evas49,
I’m not sure I understand your question or problem, could you try to explain what you are looking to achieve a bit further please?
Best regards,
RikardAugust 5, 2022 at 1:31 pm #1360799Hello,
I already did:
“How do i make the custom field “adress” visible below the content of a blogpost?”or:
How do i make any given CF visible in the content of a blogpost?What is a custom field?:
https://kriesi.at/support/search/?bbp_search=Custom+Fields
Eva Simone
August 5, 2022 at 1:52 pm #1360801Hello @guenni007 or @ismael
can you please tell me where in loop-index.php i have to place the code to get my CFs echoed?
<?php echo get_post_meta($post->ID, 'adress', true); ?>
(unfortuately there are no good comments which makes a normaly very easy thing quite complicate)I followed exactly @yigit s advice here but all i got was “Call to undefined function the_field()”:
https://kriesi.at/support/topic/displaying-custom-field-on-blog-post/This does also not work:
echo '<h2>'; get_post_meta($post->ID, 'adress', true); echo '</h2>';
It simply shows nothing although the CF “adress” exists and is filled with data.
kind regards
Eva SimoneAugust 5, 2022 at 5:06 pm #1360825Hi Eva,
Please edit loop-index.php file on your child theme and find line 569
echo '<div class="post_author_timeline"></div>'; echo av_blog_entry_markup_helper( $current_post['the_id'] ); echo '</article>';
and change it to following
echo '<div class="post_author_timeline"></div>'; echo av_blog_entry_markup_helper( $current_post['the_id'] ); echo '<p class="custom-field">'; echo get_post_meta($post->ID, 'address', true); echo '</p>'; echo '</article>';
Regards,
Yigit- This reply was modified 2 years, 4 months ago by Yigit.
August 5, 2022 at 6:46 pm #1360846Hi Yigit
it does not work.
No output.Debugging gives nothing relevant:
Warning: session_start(): Cannot start session when headers already sent in /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_entries/masonry_entries.php on line 102Eva
OKAY: WORKS
You had a typo (address instead of adress) and i didnt noticeTHANKS
- This reply was modified 2 years, 4 months ago by evas49.
August 5, 2022 at 7:51 pm #1360857Problem:
In some cases the content of the CF is hidden behind the footer section.
It happens when the nextgengallery (which is above the CF) contains more then about 8 imagesHow do i fix this?
Eva
August 8, 2022 at 3:44 am #1361037Hi,
Glad to know that the modifications above are working properly. Regarding the footer issue, Please provide a link to the page containing the nextgen gallery so that we can check it properly.
Best regards,
IsmaelAugust 21, 2022 at 5:17 pm #1362349Can we please agree on this??
– I know that you want a link and i will provide one if i have one
– You please understand that if i dont give one i dont have one.
Can we?That would save a lot of time
August 22, 2022 at 2:24 pm #1362410Hi Eva,
In that case, please provide a link when one is available. We have to see the issue to be able to provide a solution.
I tried to reproduce the issue by applying your customization and installing the 3rd party plugin, adding more than 8 images into the gallery but it works fine on my end.
Regards,
Yigit -
AuthorPosts
- The topic ‘Custom field on blogpost’ is closed to new replies.