Forum Replies Created
-
AuthorPosts
-
December 15, 2020 at 3:45 pm in reply to: How to put commas to separate taxonomies from different groups of taxonomies #1267494
Hi Ismael,
If it can be done with Javascript and it’s done, I’d like to know how. Although I have already solved it.
This is the original code:
$cats .= get_the_term_list( $the_id, $taxonomy, ”, ‘, ‘, ‘ ‘ ) . ‘ ‘;
I’ve added:
<span class=”coma”>, </span>
It stays like this:
$cats .= get_the_term_list($the_id, $taxonomy, ”, ‘, ‘, ‘<span class=”coma”>, </span>’).’ ‘;
And the coma class I have given this style:
.coma:last-child {
display: none;
}And the problem has been solved. This in the link that I provided you cannot be seen because I did it on the web that we want to publish. But, finally, I solved it.
Thanks for your attention.
- This reply was modified 3 years, 11 months ago by jeiceta.
December 13, 2020 at 4:13 am in reply to: How to put commas to separate taxonomies from different groups of taxonomies #1266847This reply has been marked as private.December 7, 2020 at 10:21 am in reply to: How to put commas to separate taxonomies from different groups of taxonomies #1265427Hi Imael, I make the distinction of categories and taxonomies to differentiate. As you can see in the screenshot, I have 4 categories: Siglos, Países, Temáticas y Municipios. . I call a category to Países and taxonomies to, for example, Alemania.
What you tell me I had already tried. But I tell you the result.. If the 4 categories are represented, put a comma at the end. If it’s not 4 o’clock, put the commas anyway. I put examples. If the 4 categories are there, it would look something like this: “Siglo XX , Reino Unido , Literatura , Puerto de la Cruz , ” With the comma at the end. And if, for example, I don’t put the last category, it puts it like this: “Siglo XX , Reino Unido , Literatura ,, ” IIt also puts the comma at the end and of the missing category. I have broken my head to see how to solve it, but nothing. Can you help me?
- This reply was modified 3 years, 11 months ago by jeiceta.
December 3, 2020 at 12:42 pm in reply to: How to put a field from a post in post content element? #1264747Hi Nikko,
Sorry for not answering earlier. I have not been able to do tests. As soon as I do, I’ll tell you. Thanks for your interest
December 3, 2020 at 2:37 am in reply to: How to put commas to separate taxonomies from different groups of taxonomies #1264603Hi Ismael,
I have created a content type and I have added some categories as you see in the image. Categories in red
There are 4 different categories that in turn contain several taxonomies. Those that are from the same group of taxonomies are separated by commas, but those that are of a different category are not, as you can see in my first post. Where if they come out with green arrows and where they don’t come out with red arrows. It should be, according to the example you see in the image of my first publication in the first entry, 1954, like this:SIGLO XX, FRANCIA, ARTE, PUERTO DE LA CRUZ, SANTA CRUZ DE TENERIFE
- This reply was modified 3 years, 12 months ago by jeiceta.
November 29, 2020 at 3:23 am in reply to: How to put the posts on the category pages in the order of the articles? #1263722Hi. I have achieved this by putting the following code in the template’s functions.php file
add_action( ‘pre_get_posts’, ‘dcms_order_content’ );
function dcms_order_content( $query ) {
if ( $query->is_main_query() && is_tax(‘pais’) ){
$query->set( ‘post_type’, ‘hitos_de_tenerife’ );
$query->set( ‘orderby’, ‘menu_order’ );
$query->set( ‘order’, ‘ASC’ );
}
return $query;
}November 28, 2020 at 6:23 pm in reply to: How to put the posts on the category pages in the order of the articles? #1263691Hello Victoria. Finally if I need help.
I have to find where to put the orderby command to be able to sort the category pages in the frontend by menu order. But I can’t find the file that I have to modify or the exact place to change or place the order. Do you know what file it is?
November 27, 2020 at 9:27 pm in reply to: How to put the posts on the category pages in the order of the articles? #1263598Hello Victoria. Yes, I managed to do it with a plugin. Thank you.
November 27, 2020 at 5:44 pm in reply to: How to put a field from a post in post content element? #1263552Hi Nikko. Right. I know that. I put it in the first entry of this post. What I would like to know is what am I doing wrong. I have put the code that you can see in the image
And the result is what you see in the following image. The Año field reflects this well. But the flags (bandera) are put where you can see, instead of under the image of the post. And put those of all the entries on the page. I do not know why. And the country (pais), instead of putting the name, in this case United Kingdom, puts ARRAY. How do I make it look the way I want?
- This reply was modified 4 years ago by jeiceta.
November 27, 2020 at 2:36 am in reply to: How to put the posts on the category pages in the order of the articles? #1263423Thanks Victoria. Was the solution
November 24, 2020 at 3:45 pm in reply to: How to put a field from a post in post content element? #1262714Hi. Thank you for reviewing it. I have added the fields that I comment on the backend, but not on the frontend. That is where I have the problem. My question is, in which file, I think it is wp-content / themes / enfold / config-templatebuilder / avia-shortcodes / postslider.php, do I have to add those fields, which I explain at the beginning of this post, and how?
November 23, 2020 at 3:37 pm in reply to: How to put a field from a post in post content element? #1262416Done. The post is in Hitos de Tenerife
- This reply was modified 4 years ago by jeiceta.
November 23, 2020 at 3:37 pm in reply to: How to put a field from a post in post content element? #1262415This reply has been marked as private.One more question. If I wanted to put it in the masonry widget, where would I have to put it?
Hello. Perfect. Works. It’s what I needed. Many thanks
Is a text field
Hello, thank you agani. Now the field appears. But the date (the field) of the first post is repeated in the rest. That is, it only puts a single date, that of the first post published in all posts. It does not take the one from each field.
Hello, thanks for your answer. I put this code “echo get_field (“Date”);” How would I put it where you indicate?
Hello, I have added a field to the blog posts. On the blog page I put the content element that you see in image1. And on the web it looks like in the image2. I want it to look like in image 3 where I have added the year field (it could be another). In which file (php or other) can I add that field?
Imagen1
Imagen2
Imagen3
-
AuthorPosts