updated associats view, convos view and styles

This commit is contained in:
jorge-vitrubio 2024-03-12 20:23:55 +01:00
parent 1b31cdf4b8
commit b612a464f1
16 changed files with 406 additions and 225 deletions

View File

@ -974,74 +974,72 @@ Add your custom styles in this file so it is easier to update the theme.
padding: 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .home .xarxaprod-label,
.edit-post-visual-editor__content-area .editor-styles-wrapper article:not(.type-post) .xarxaprod-label {
margin: 0;
padding: 0;
display: inline;
}
@media screen {
.edit-post-visual-editor__content-area .editor-styles-wrapper .home .xarxaprod-label li,
.edit-post-visual-editor__content-area .editor-styles-wrapper article:not(.type-post) .xarxaprod-label li {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #000;
border: 1px solid #000;
background-color: none;
font-size: 0.7rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-label {
margin: 0;
padding: 0;
display: inline;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .home .item-xxp_fund_call,
.edit-post-visual-editor__content-area .editor-styles-wrapper article:not(.type-post) .item-xxp_fund_call {
display: block;
margin: 0.2rem 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-label li {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #000;
border: 1px solid #000;
background-color: none;
font-size: 0.8rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .home .item-xxp_fund_call li,
.edit-post-visual-editor__content-area .editor-styles-wrapper article:not(.type-post) .item-xxp_fund_call li {
font-size: 1.2rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .item-xxp_fund_call {
display: block;
margin: 0.2rem 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .home .item-xxp_fund_apply_text,
.edit-post-visual-editor__content-area .editor-styles-wrapper article:not(.type-post) .item-xxp_fund_apply_text {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
font-size: 0.7rem;
text-transform: uppercase;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .item-xxp_fund_call li {
font-size: 1.2rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types ul {
margin: 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .item-xxp_fund_apply_text {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
font-size: 0.7rem;
text-transform: uppercase;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types .cat-item {
display: inline-block;
margin: 0.1em 0.5em 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #fff;
background-color: #000;
font-size: 1.1rem;
text-transform: uppercase;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types ul {
margin: 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types a {
color: #fff;
text-decoration: none;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types .cat-item {
display: inline-block;
margin: 0.1em 0.5em 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #fff;
background-color: #000;
font-size: 1.1rem;
text-transform: uppercase;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types a:visited,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types a:hover {
color: #fff;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types a {
color: #fff;
text-decoration: none;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-ajut article:not(.type-post) .xarxaprod-label li {
font-size: 1.1rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types a:visited,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-faqs-types a:hover {
color: #fff;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-ajut article:not(.type-post) .item-xxp_fund_apply_text {
font-size: 1.1rem;
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-ajut article:not(.type-post) .xarxaprod-label li {
font-size: 1.1rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-ajut article:not(.type-post) .item-xxp_fund_apply_text {
font-size: 1.1rem;
}
}
.edit-post-visual-editor__content-area .editor-styles-wrapper embed,
@ -1270,7 +1268,6 @@ Add your custom styles in this file so it is easier to update the theme.
grid-template-areas: "main" "secondary ";
grid-row: auto;
align-items: center;
margin-bottom: 2rem;
padding: 0.5rem 0;
width: 100vw;
background-color: transparent;
@ -1295,7 +1292,7 @@ Add your custom styles in this file so it is easier to update the theme.
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > section {
padding: 4em 0;
padding: 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > section > header {
@ -1311,7 +1308,7 @@ Add your custom styles in this file so it is easier to update the theme.
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-footer :where(.wp-block-columns.is-layout-flex) {
gap: 8em;
gap: 5rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-footer .site-info > section {
@ -1425,6 +1422,7 @@ Add your custom styles in this file so it is easier to update the theme.
grid-template-columns: 1fr 2fr 2fr 1fr;
grid-template-areas: "main " "secondary ";
margin: auto;
margin-bottom: 2rem;
padding: 0;
}
@ -1443,6 +1441,10 @@ Add your custom styles in this file so it is easier to update the theme.
padding: 0 2rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-main > section {
padding: 4em 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .site-footer {
flex-flow: column;
}
@ -1452,7 +1454,6 @@ Add your custom styles in this file so it is easier to update the theme.
}
.edit-post-visual-editor__content-area .editor-styles-wrapper.single .site-main {
width: 45rem;
margin: 0 auto;
}
@ -1858,6 +1859,10 @@ Add your custom styles in this file so it is easier to update the theme.
* ./template-parts/content-xarxaprod-ajut.php
* ./template-parts/content-xarxaprod-convo.php
* ./template-parts/section-eachpost.php
* */
/* used in
* ./template-parts/content-xarxaprod-associat.php
* */
/*
@ -2037,7 +2042,7 @@ Add your custom styles in this file so it is easier to update the theme.
grid-template-columns: 0.75fr 2.25fr;
padding: 0.2em 0;
border-top: 0.05em solid #000;
font-size: 1.5em;
font-size: 1em;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li:last-of-type,
@ -2081,6 +2086,39 @@ Add your custom styles in this file so it is easier to update the theme.
margin: 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat > section {
margin-top: 4em;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 2rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact li,
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-services li {
display: grid;
font-size: 1em;
border: none;
border-top: 0.05em solid #000;
margin: 0;
padding: 0.5em 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact h6,
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact p,
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-services h6,
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-services p {
font-size: 1em;
margin: 0;
padding: 0;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact li {
grid-template-columns: 1fr 2fr;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-cards,
.edit-post-visual-editor__content-area .editor-styles-wrapper .category-convocatories,
.edit-post-visual-editor__content-area .editor-styles-wrapper .category-activitats,
@ -2276,6 +2314,11 @@ Add your custom styles in this file so it is easier to update the theme.
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-convo-info-fields li,
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda-info li {
font-size: 1.5em;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .xarxaprod-agenda .xarxaprod-card-each {
flex-direction: row-reverse;
}
@ -2362,7 +2405,7 @@ Add your custom styles in this file so it is easier to update the theme.
.edit-post-visual-editor__content-area .editor-styles-wrapper .gallery {
margin-bottom: 1.5em;
display: grid;
grid-gap: 1.5em;
grid-gap: 1rem;
}
.edit-post-visual-editor__content-area .editor-styles-wrapper .gallery-item {
@ -2550,7 +2593,7 @@ Add your custom styles in this file so it is easier to update the theme.
.edit-post-visual-editor__content-area .editor-styles-wrapper .contactform-fund-info {
display: inline-block;
column-count: 2;
column-gap: 2em;
column-gap: 1rem;
width: 100%;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -185,6 +185,11 @@ if ( defined( 'JETPACK__VERSION' ) ) {
*/
require get_template_directory() . '/inc/login-functions.php';
/**
* Functions to modify user role capabilities
*/
require get_template_directory() . '/inc/user-role-capabilities-mod.php';
/**
* Functions to personalize the_archive_title() function
*/

View File

@ -32,9 +32,6 @@ get_header();
//get_template_part( 'template-parts/section', 'featured' );
get_template_part( 'template-parts/section', 'last-convos' );
get_template_part( 'template-parts/section', 'agenda' );
//echo '<aside id="extra" class="extra-content contingut-extra">';
// dynamic_sidebar( 'front-page-widgets' ); // including widget front page
//echo '</aside>';
endif;
?>
@ -42,9 +39,6 @@ get_header();
</main><!-- #main -->
<?php
if ( is_front_page() ) :
//get_template_part( 'template-parts/section', 'featured' );
//get_template_part( 'template-parts/section', 'last-convos' );
//get_template_part( 'template-parts/section', 'agenda' );
echo '<aside id="extra" class="extra-content contingut-extra">';
dynamic_sidebar( 'front-page-widgets' ); // including widget front page
echo '</aside>';

View File

@ -26,8 +26,7 @@ dd {
margin: 0 0 0.5em 0.5em;
padding: 0;
}
.home,article:not(.type-post){
@media screen {
.xarxaprod-label {
margin: 0;
padding: 0;
@ -39,7 +38,7 @@ dd {
color: $color__text-screen;
border: 1px solid $color__black;
background-color: none;
font-size: $font__size-body*0.7;
font-size: $font__size-body*0.8;
}
}
.item-xxp_fund_call {
@ -56,37 +55,38 @@ dd {
font-size: $font__size-body*0.7;
text-transform: uppercase;
}
}
.xarxaprod-faqs-types {
ul {
margin: 0;
}
.cat-item {
display:inline-block;
margin: 0.1em 0.5em 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: $color__white;
background-color: $color__black;
font-size: $font__size-body*1.1;
text-transform: uppercase;
}
a {
color: $color__white;
text-decoration: none;
&:visited, &:hover{
.xarxaprod-faqs-types {
ul {
margin: 0;
}
.cat-item {
display:inline-block;
margin: 0.1em 0.5em 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: $color__white;
background-color: $color__black;
font-size: $font__size-body*1.1;
text-transform: uppercase;
}
a {
color: $color__white;
text-decoration: none;
&:visited, &:hover{
color: $color__white;
}
}
}
}
.single-xarxaprod-ajut {
article:not(.type-post) {
.xarxaprod-label {
li {
.single-xarxaprod-ajut {
article:not(.type-post) {
.xarxaprod-label {
li {
font-size: $font__size-body*1.1;
}
}
.item-xxp_fund_apply_text {
font-size: $font__size-body*1.1;
}
}
.item-xxp_fund_apply_text {
font-size: $font__size-body*1.1;
}
}
}

View File

@ -154,7 +154,7 @@
grid-template-columns: 0.75fr 2.25fr;
padding: 0.2em 0;
border-top: 0.05em solid $color__black;
font-size: 1.5em;
font-size: 1em;
&:last-of-type{
border-bottom: 0.05em solid $color__black;
}
@ -187,6 +187,53 @@
}
}
/* used in
* ./template-parts/content-xarxaprod-associat.php
* */
.single-xarxaprod-associat {
.xarxaprod-associat {
> section {
margin-top: 4em;
}
.xarxaprod-associat-info {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: $grid__gap * 2;
.xarxaprod-associat-contact,
.xarxaprod-associat-services {
li {
display: grid;
font-size: 1em;
border: none;
border-top: $border__line;
margin: 0;
padding: 0.5em 0;
}
h6,p {
font-size: 1em;
margin: 0;
padding: 0;
}
}
.xarxaprod-associat-contact li {
grid-template-columns: 1fr 2fr;
}
.xarxaprod-associat-services li {
}
.xarxaprod-associat-logo {
}
}
.xarxaprod-associat-convos {
}
.xarxaprod-associat-location {
.xarxaprod-associat-osm-link {
}
.xarxaprod-associat-osm-map {
}
}
}
}
/*
* categories:
*
@ -369,6 +416,13 @@
.archive-posts {
grid-template-columns: repeat(2 , minmax(0,1fr));
}
.xarxaprod-convo-info-fields,
.xarxaprod-agenda-info {
li {
font-size: 1.5em;
}
}
.xarxaprod-agenda {
.xarxaprod-card-each {
flex-direction: row-reverse;

View File

@ -1,7 +1,7 @@
.gallery {
margin-bottom: 1.5em;
display: grid;
grid-gap: 1.5em;
grid-gap: $grid__gap;
}
.gallery-item {

View File

@ -75,7 +75,7 @@
color: $color__white;
margin-top: 4em;
:where(.wp-block-columns.is-layout-flex) {
gap: 8em;
gap: $grid__gap * 5; //8em;
}
.wp-block-column:last-of-type {
//padding-left: 4em;
@ -211,7 +211,7 @@
}
&.single {
.site-main {
width: 45rem;
//width: 45rem;
margin: 0 auto;
}
}

View File

@ -82,7 +82,7 @@
.contactform-fund-info {
display: inline-block;
column-count: 2;
column-gap: 2em;
column-gap: $grid__gap;
width: 100%;
.contactform-descripcio textarea {
display: inline-block;

172
style.css
View File

@ -828,74 +828,72 @@ dd {
padding: 0;
}
.home .xarxaprod-label,
article:not(.type-post) .xarxaprod-label {
margin: 0;
padding: 0;
display: inline;
}
@media screen {
.home .xarxaprod-label li,
article:not(.type-post) .xarxaprod-label li {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #000;
border: 1px solid #000;
background-color: none;
font-size: 0.7rem;
}
.xarxaprod-label {
margin: 0;
padding: 0;
display: inline;
}
.home .item-xxp_fund_call,
article:not(.type-post) .item-xxp_fund_call {
display: block;
margin: 0.2rem 0;
}
.xarxaprod-label li {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #000;
border: 1px solid #000;
background-color: none;
font-size: 0.8rem;
}
.home .item-xxp_fund_call li,
article:not(.type-post) .item-xxp_fund_call li {
font-size: 1.2rem;
}
.item-xxp_fund_call {
display: block;
margin: 0.2rem 0;
}
.home .item-xxp_fund_apply_text,
article:not(.type-post) .item-xxp_fund_apply_text {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
font-size: 0.7rem;
text-transform: uppercase;
}
.item-xxp_fund_call li {
font-size: 1.2rem;
}
.xarxaprod-faqs-types ul {
margin: 0;
}
.item-xxp_fund_apply_text {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
font-size: 0.7rem;
text-transform: uppercase;
}
.xarxaprod-faqs-types .cat-item {
display: inline-block;
margin: 0.1em 0.5em 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #fff;
background-color: #000;
font-size: 1.1rem;
text-transform: uppercase;
}
.xarxaprod-faqs-types ul {
margin: 0;
}
.xarxaprod-faqs-types a {
color: #fff;
text-decoration: none;
}
.xarxaprod-faqs-types .cat-item {
display: inline-block;
margin: 0.1em 0.5em 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
color: #fff;
background-color: #000;
font-size: 1.1rem;
text-transform: uppercase;
}
.xarxaprod-faqs-types a:visited,
.xarxaprod-faqs-types a:hover {
color: #fff;
}
.xarxaprod-faqs-types a {
color: #fff;
text-decoration: none;
}
.single-xarxaprod-ajut article:not(.type-post) .xarxaprod-label li {
font-size: 1.1rem;
}
.xarxaprod-faqs-types a:visited,
.xarxaprod-faqs-types a:hover {
color: #fff;
}
.single-xarxaprod-ajut article:not(.type-post) .item-xxp_fund_apply_text {
font-size: 1.1rem;
.single-xarxaprod-ajut article:not(.type-post) .xarxaprod-label li {
font-size: 1.1rem;
}
.single-xarxaprod-ajut article:not(.type-post) .item-xxp_fund_apply_text {
font-size: 1.1rem;
}
}
/* Make sure embeds and iframes fit their containers. */
@ -1132,7 +1130,6 @@ textarea {
grid-template-areas: "main" "secondary ";
grid-row: auto;
align-items: center;
margin-bottom: 2rem;
padding: 0.5rem 0;
width: 100vw;
background-color: transparent;
@ -1157,7 +1154,7 @@ textarea {
}
.site-main > section {
padding: 4em 0;
padding: 0;
}
.site-main > section > header {
@ -1173,7 +1170,7 @@ textarea {
}
.site-footer :where(.wp-block-columns.is-layout-flex) {
gap: 8em;
gap: 5rem;
}
.site-footer .site-info > section {
@ -1287,6 +1284,7 @@ textarea {
grid-template-columns: 1fr 2fr 2fr 1fr;
grid-template-areas: "main " "secondary ";
margin: auto;
margin-bottom: 2rem;
padding: 0;
}
@ -1305,6 +1303,10 @@ textarea {
padding: 0 2rem;
}
.site-main > section {
padding: 4em 0;
}
.site-footer {
flex-flow: column;
}
@ -1314,7 +1316,6 @@ textarea {
}
.single .site-main {
width: 45rem;
margin: 0 auto;
}
@ -1877,7 +1878,7 @@ textarea {
grid-template-columns: 0.75fr 2.25fr;
padding: 0.2em 0;
border-top: 0.05em solid #000;
font-size: 1.5em;
font-size: 1em;
}
.xarxaprod-convo-info-fields li:last-of-type,
@ -1921,6 +1922,42 @@ textarea {
margin: 0;
}
/* used in
* ./template-parts/content-xarxaprod-associat.php
* */
.single-xarxaprod-associat .xarxaprod-associat > section {
margin-top: 4em;
}
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 2rem;
}
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact li,
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-services li {
display: grid;
font-size: 1em;
border: none;
border-top: 0.05em solid #000;
margin: 0;
padding: 0.5em 0;
}
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact h6,
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact p,
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-services h6,
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-services p {
font-size: 1em;
margin: 0;
padding: 0;
}
.single-xarxaprod-associat .xarxaprod-associat .xarxaprod-associat-info .xarxaprod-associat-contact li {
grid-template-columns: 1fr 2fr;
}
/*
* categories:
*
@ -2128,6 +2165,11 @@ textarea {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.xarxaprod-convo-info-fields li,
.xarxaprod-agenda-info li {
font-size: 1.5em;
}
.xarxaprod-agenda .xarxaprod-card-each {
flex-direction: row-reverse;
}
@ -2225,7 +2267,7 @@ textarea {
.gallery {
margin-bottom: 1.5em;
display: grid;
grid-gap: 1.5em;
grid-gap: 1rem;
}
.gallery-item {
@ -2431,7 +2473,7 @@ textarea {
.contactform-fund-info {
display: inline-block;
column-count: 2;
column-gap: 2em;
column-gap: 1rem;
width: 100%;
}

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php endif; ?>
<?php xarxaprod_post_thumbnail(); ?>
<?php //xarxaprod_post_thumbnail(); ?>
<div class="entry-content">
<?php

View File

@ -1,6 +1,6 @@
<?php
/**
* Template part for displaying posts
* Template part for displaying associat post type
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
@ -41,55 +41,67 @@
);
?>
</main><!-- .entry-content -->
<section class="xarxaprod-associat-info">
<section class="xarxaprod-associat-contact">
<dt>&nbsp;</dt>
<ul class="xarxaprod-associat-contact-fields">
<?php if( get_field('xxp_associat_address') ): ?>
<li class="xarxaprod-associat-address">
<h6>adreça / direccion:</h6>
<p><?php the_field('xxp_associat_address'); ?></p>
</li>
<?php endif; ?>
<section class="xarxaprod-associat-info-contact-fields">
<?php if( get_field('xxp_associat_mail') ): ?>
<li class="xarxaprod-associat-mail">
<h6>mail:</h6>
<p><a href="mailto:<?php the_field('xxp_associat_mail'); ?>"><?php the_field('xxp_associat_mail'); ?></a></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_address') ): ?>
<div class="xarxaprod-associat-info-field">
<h6>adreça / direccion:</h6>
<p class="xarxaprod-associat-address"><?php the_field('xxp_associat_address'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('xxp_associat_web') ): ?>
<li class="xarxaprod-associat-web">
<h6>web:</h6>
<p><a href="<?php the_field('xxp_associat_web'); ?>" class=""><?php the_field('xxp_associat_web') ;?></a></p>
</li>
<?php endif; ?>
<?php if( get_field('xxp_associat_tel') ): ?>
<li class="xarxaprod-associat-tel">
<h6>tel:</h6>
<p><?php the_field('xxp_associat_tel'); ?></p>
</li>
<?php endif; ?>
</ul>
</section>
<?php if( get_field('xxp_associat_mail') ): ?>
<div class="xarxaprod-associat-info-field">
<h6>mail:</h6>
<p class="xarxaprod-associat-mail"><a href="mailto:<?php the_field('xxp_associat_mail'); ?>"><?php the_field('xxp_associat_mail'); ?></a></p>
</div>
<?php endif; ?>
<section class="xarxaprod-associat-services">
<dt>Serveis</dt>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_associat_service') ); ?>
</section>
<?php if( get_field('xxp_associat_web') ): ?>
<div class="xarxaprod-associat-info-field">
<h6>web:</h6>
<p><a href="<?php the_field('xxp_associat_web'); ?>" class=""><?php the_field('xxp_associat_web') ;?></a></p>
</div>
<?php endif; ?>
<?php if( get_field('xxp_associat_tel') ): ?>
<div class="xarxaprod-associat-info-field">
<h6>tel:</h6>
<p class="xarxaprod-associat-tel"><?php the_field('xxp_associat_tel'); ?></p>
</div>
<?php endif; ?>
<section class="xarxaprod-associat-logo">
<?php if( get_field('xxp_associat_logo') ): ?>
<figure class="xarxaprod-associat-logo">
<img class="" src="<?php the_field('xxp_associat_logo'); ?>" />
</figure>
<?php endif; ?>
</section>
</section>
</section>
<section class="xarxaprod-associat-convos">
<section class="xarxaprod-associat-info-fields">
<?php
// https://www.advancedcustomfields.com/resources/bidirectional-relationships/
// https://www.advancedcustomfields.com/resources/relationship/
;?>
<?php get_template_part( 'template-parts/section', 'last-convos' ); ?>
<div class="xarxaprod-associat-info-field">
<h6>Serveis</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_associat_service') ); ?>
</div>
</section>
<section class="xarxaprod-associat-logo-fields">
<?php if( get_field('xxp_associat_logo') ): ?>
<figure class="xarxaprod-associat-logo-field">
<img class="xarxaprod-associat-logo" src="<?php the_field('xxp_associat_logo'); ?>" />
</figure>
<?php endif; ?>
</section>
</section>
<section class="xarxaprod-associat-location">
<?php if( get_field('xxp_associat_osm_link') ): ?>
<div class="xarxaprod-associat-osm-link">
@ -98,19 +110,12 @@
<?php endif; ?>
<?php if( get_field('xxp_associat_osm_map') ): ?>
<div class="xarxaprod-associat-osm-link">
<div class="xarxaprod-associat-osm-map">
<h6 class="">Mapa:</h6>
<figure><?php the_field('xxp_associat_osm_map'); ?></figure>
</div>
<?php endif; ?>
</section>
<section class="xarxaprod-associat-convos">
<a href="https://www.advancedcustomfields.com/resources/bidirectional-relationships/">https://www.advancedcustomfields.com/resources/bidirectional-relationships/</a>
<a href="https://www.advancedcustomfields.com/resources/relationship/">https://www.advancedcustomfields.com/resources/relationship/</a>
<?php get_template_part( 'template-parts/section', 'last-convos' ); ?>
</section>
<footer class="entry-footer">
<?php xarxaprod_entry_footer(); ?>

View File

@ -63,8 +63,9 @@
<span class="item-xxp_convo_apply_begin">del <?php the_field('xxp_convo_apply_begin'); ?> </span>
al
<span class="item-xxp_convo_apply_end">al <?php the_field('xxp_convo_apply_end'); ?> </span>
<?php if( get_field('xxp_convo_apply_text') ): ?>
<p class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></p>
<?php if( get_field('xxp_convo_apply_text') ): ?>
<br />
<span class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></span>
<?php endif; ?>
</dd>
<?php endif; ?>

View File

@ -18,6 +18,42 @@
//plugin is activated do
?>
<header>
<?php if ( get_post_type( ) == 'xarxaprod-associat' ){ ?>
<?php $slug_espai_associat =get_post_field( 'post_name', get_post() ) ; ?>
<?php
if( get_field('xxp_convo_espai_associat') ):
$espai_associat_posts = get_field('xxp_convo_espai_associat');
if( $espai_associat_posts ):
foreach( $espai_associat_posts as $post ):
setup_postdata($post);
//do somethin
the_title( '<h3> convos de'.'</h3>');
endforeach;
wp_reset_postdata();
endif;
endif;
?>
<h3> <a href="<?php echo home_url( '/convos/?xxp_convo_center=' ) . $slug_espai_associat ;?>"><?php echo esc_html__('Últimes convocatòries', 'xarxaprod'); ?> de <?php the_title(); ?></a></h3>
</header>
<main class="xarxaprod-last-convos xarxaprod-ultimes-convocatories">
<?php
// https://developer.wordpress.org/reference/functions/get_posts/
// https://www.advancedcustomfields.com/resources/true-false/
$convos_query = new WP_Query(
array(
'post_type' => array( 'xarxaprod-convo' ),
'posts_per_page' => '3',
//'meta_key' => 'xxp_convo_center',
'meta_key' => 'xxp_convo_espai_associat',
'meta_value' => $slug_espai_associat,
//'meta_query' => array (
// 'key' => 'xxp_convo_center',
// 'value' => $slug,
// 'compare' => '=',
//)
) );
?>
<?php } else { ?>
<h2> <a href="<?php echo site_url() . '/convocatories' ;?>"><?php echo esc_html__('Últimes convocatòries', 'xarxaprod'); ?></a></h2>
</header>
<main class="xarxaprod-last-convos xarxaprod-ultimes-convocatories">
@ -31,6 +67,7 @@
'posts_per_page' => '3'
) );
?>
<?php };?>
<?php if ( $convos_query->have_posts() ) : ?>
<?php while ( $convos_query->have_posts() ) : $convos_query->the_post(); ?>