LightBen
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Plugin adding a specific field in the wysiwygHi Steve, and thanks for your answer.
I already have ACF. May be I didn’t find the way to do that. Do you know where is it written I can add a custom button in the editor?
Thanks!
Forum: Developing with WordPress
In reply to: How can I set automatic custom fields for every post?Hi, I found the problem… looks like a bug though.
I added to the page a custom field (from WordPress, not the plugin). This addition didn’t get saved but then the ACF appeared. Looks like it “unlocked” it.
I think I can consider this topic as resolved as I got all the tools to go further thanks to you all =D I’m so happy, thanks again tons
Forum: Developing with WordPress
In reply to: How can I set automatic custom fields for every post?Sorry I made a mistake. I meant I wrote:
<?php the_field('fieldName'); ?>
and it doesn’t display any data
- This reply was modified 8 years, 1 month ago by LightBen.
Forum: Developing with WordPress
In reply to: How can I set automatic custom fields for every post?Hi and thanks. I had a look at Advanced Custom Fields (ACF) and I think with my level it’s best to just use it.
My only thing is that I think I’m missing something in the understanding of WP templates.
I created a custom field in the extension and got the name of it, inserted in my code that:
<?php get_field('fieldName'); ?>
But it doesn’t show anything. Do you know about that?
I suppose I’m close to the solution of all my problems now, thanks again everybody, I learned a lot with you.
Forum: Developing with WordPress
In reply to: How can I set automatic custom fields for every post?Hi guys and thanks a ton for your answers. Everyone helped me. My concerns were:
1) Create a custom field which is used in only one place
2) Same than 1) but different with the language
3) When I create a post, that this post automatically has the custom fields I want (like in the example above, “number of people”).Here is what I finally did for each of them:
1) I create a page in WordPress called “Custom fields” which is private and where I only put custom fields for all the website. I then pull the custom field I want in the code base with get_post_meta(). It can sound bizarre but I like this way, it permits me to have everything in one place and available for clients who would not enter into the code. Thanks to my friend Nathan for this idea.
2) Same but I had to create a function before:<?php $currentlang = get_bloginfo('language'); if($currentlang=="fr-FR") { $menuHome = '1109'; } else { /* EN */ $menuHome = '1107'; } ?>
So I have the translations in one file. In the HTML, the get_post_meta() would automatically retrieve the variable (in here, $menuHome) and the content is pulled from the Custom fields page in wordpress.
3) I have to create a post template. But now I would like to know how to define the custom fields I want in the code without using an extension?
Thanks guys again =D
Forum: Plugins
In reply to: [DW Question & Answer] Questions about functionalitiesUp?
Forum: Plugins
In reply to: [Polylang] Automatic tasksThanks a lot I will have a look at that!!
Forum: Plugins
In reply to: [Polylang] Automatic tasksHi thanks for your answer =)
2) definitely like this =) can you help me on that?
1) I created new pages but Polylang only created a field (+) where I can create a new translation for other language. It didn’t copy the category, neither the tags, neither the title or content of the original english page
Thanks =D
Forum: Themes and Templates
In reply to: [Flat Bootstrap] Change the excerpt (for videos)I did it! I made a child theme, style.css and functions.php
I added your code and under it the code here: https://bacsoftwareconsulting.com/blog/index.php/wordpress-cat/how-to-preserve-html-tags-in-wordpress-excerpt-without-a-plugin/
Thanks a lot =)
Forum: Themes and Templates
In reply to: [Flat Bootstrap] Change the excerpt (for videos)OK I created a child theme. Everything is done with CSS and I have put your function in functions.php.
Now I need to edit content.php or create content-video.php…
Can you help me more ith that?Thanks =)
Forum: Themes and Templates
In reply to: [Flat Bootstrap] Change the excerpt (for videos)Hi and thanks for your answer.
You mean there is no way to do it but only by making a child theme?
I never did that, is it easy and can I do it by not changing anything of the original theme but just add this function?
Thanks =)
Forum: Fixing WordPress
In reply to: Video hidden in the excerptSorry, I think I’m not good enough to understand your answers… I tried also this solutions: https://bacsoftwareconsulting.com/blog/index.php/wordpress-cat/how-to-preserve-html-tags-in-wordpress-excerpt-without-a-plugin/ and another similar one I don’t find but the result is that I don’t get any content in the excerpt so something is wrong with that also…
Forum: Fixing WordPress
In reply to: Video hidden in the excerptHi,
Thanks for your answer but I would prefer a way a bit cleaner than that.
I heard about “filter” in the excerpt, may be it is that? There is a filter in the excerpt with parameters I could eventually change?
Forum: Fixing WordPress
In reply to: Video hidden in the excerptUp to my topic =)
Forum: Fixing WordPress
In reply to: Video hidden in the excerptSorry I should have been more precise =)