Compare commits
4 Commits
634c56e175
...
eb262fe2b2
Author | SHA1 | Date |
---|---|---|
jorge | eb262fe2b2 | |
jorge | 5064491e29 | |
jorge | 21c2cf44be | |
jorge | a8a2c55bc7 |
|
@ -1027,6 +1027,36 @@ Add your custom styles in this file so it is easier to update the theme.
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit-post-visual-editor__content-area .ofisuport-search-form {
|
||||||
|
display: flex;
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-post-visual-editor__content-area .ofisuport-search-form .search-field {
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-post-visual-editor__content-area .ofisuport-search-form .search-submit {
|
||||||
|
border: none;
|
||||||
|
margin: 0rem;
|
||||||
|
font-size: 0px;
|
||||||
|
width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
background: none;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-post-visual-editor__content-area .ofisuport-search-form .ofisuport-icon-search:before {
|
||||||
|
z-index: 0;
|
||||||
|
min-width: 2.5rem;
|
||||||
|
min-height: 2.5rem;
|
||||||
|
font: normal 2rem/1 dashicons !important;
|
||||||
|
content: "\f179";
|
||||||
|
padding: 0;
|
||||||
|
margin: 0.1rem 0 0 -1.5rem;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
.edit-post-visual-editor__content-area input[type="text"],
|
.edit-post-visual-editor__content-area input[type="text"],
|
||||||
.edit-post-visual-editor__content-area input[type="email"],
|
.edit-post-visual-editor__content-area input[type="email"],
|
||||||
.edit-post-visual-editor__content-area input[type="url"],
|
.edit-post-visual-editor__content-area input[type="url"],
|
||||||
|
@ -1647,12 +1677,17 @@ Add your custom styles in this file so it is easier to update the theme.
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 48em) {
|
@media screen and (max-width: 48em) {
|
||||||
|
<<<<<<< HEAD
|
||||||
|
.edit-post-visual-editor__content-area .ofisuport-filters section {
|
||||||
|
display: inline-block;
|
||||||
|
=======
|
||||||
.edit-post-visual-editor__content-area .post,
|
.edit-post-visual-editor__content-area .post,
|
||||||
.edit-post-visual-editor__content-area .page {
|
.edit-post-visual-editor__content-area .page {
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
}
|
}
|
||||||
.edit-post-visual-editor__content-area .ofisuport-filters section {
|
.edit-post-visual-editor__content-area .ofisuport-filters section {
|
||||||
display: block;
|
display: block;
|
||||||
|
>>>>>>> dev
|
||||||
}
|
}
|
||||||
.edit-post-visual-editor__content-area .ofisuport-filters section h5 {
|
.edit-post-visual-editor__content-area .ofisuport-filters section h5 {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,9 @@ get_header();
|
||||||
<main id="primary" class="site-main">
|
<main id="primary" class="site-main">
|
||||||
|
|
||||||
<?php if( in_category('faq') ) : ?>
|
<?php if( in_category('faq') ) : ?>
|
||||||
<?php ofisuport_display_faqs_labels(); ?>
|
<?php ofisuport_display_faqs_labels(); ?>
|
||||||
|
<?php ofisuport_display_faqs_search(); ?>
|
||||||
|
|
||||||
<?php endif; //end if is_category faq ?>
|
<?php endif; //end if is_category faq ?>
|
||||||
<content class="archive-posts ">
|
<content class="archive-posts ">
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
|
|
|
@ -112,3 +112,27 @@ if ( ! function_exists( 'ofisuport_display_each_faq_categories' ) ) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endif; //end ofisuport_display_each_faq_categories
|
endif; //end ofisuport_display_each_faq_categories
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display search form for FAQs
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! function_exists( 'ofisuport_display_faq_search' ) ) :
|
||||||
|
function ofisuport_display_faqs_search() {
|
||||||
|
// search form for category
|
||||||
|
// https://developer.wordpress.org/reference/functions/get_search_form/#comment-369
|
||||||
|
// https://wordpress.stackexchange.com/questions/313037/restrict-a-search-to-a-custom-post-type
|
||||||
|
?>
|
||||||
|
<aside id="search-form-faqs" class="ofisuport-search-faqs">
|
||||||
|
<form class="ofisuport-search-form" role="search" method="get" action="/">
|
||||||
|
<label class="screen-reader-text" for="search">Search in ajuts</label>
|
||||||
|
<input type="search" id="search" class="search-field" placeholder="cerca faqs..." value="<?php the_search_query();?>" name="s" />
|
||||||
|
<input type="submit" id="searchsubmit" class="search-submit button button-search" value="cerca">
|
||||||
|
<span class="ofisuport-search-submit ofisuport-icon-search"></span>
|
||||||
|
<input type="hidden" value="posts" name="post_type" id="post_type" />
|
||||||
|
<input type="hidden" value="faq" name="category_name" id="category_name" />
|
||||||
|
</form>
|
||||||
|
</aside>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
endif; //end ofisuport_display_each_faq_categories
|
||||||
|
|
|
@ -44,6 +44,7 @@ get_header();
|
||||||
|
|
||||||
<?php //if( in_category('faq') ) : ?>
|
<?php //if( in_category('faq') ) : ?>
|
||||||
<?php ofisuport_display_faqs_labels(); ?>
|
<?php ofisuport_display_faqs_labels(); ?>
|
||||||
|
<?php ofisuport_display_faqs_search(); ?>
|
||||||
<?php //endif; //end if is_category faq ?>
|
<?php //endif; //end if is_category faq ?>
|
||||||
|
|
||||||
<content class="archive-posts <?php ofisuport_class_posttype(); ?>">
|
<content class="archive-posts <?php ofisuport_class_posttype(); ?>">
|
||||||
|
|
|
@ -97,3 +97,30 @@ input[type="submit"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ofisuport-search-form {
|
||||||
|
display: flex;
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
.search-field {
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
.search-submit{
|
||||||
|
border: none;
|
||||||
|
margin: 0rem;
|
||||||
|
font-size: 0px;
|
||||||
|
width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
background: none;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
.ofisuport-icon-search:before {
|
||||||
|
z-index: 0;
|
||||||
|
min-width: 2.5rem;
|
||||||
|
min-height: 2.5rem;
|
||||||
|
font: normal 2rem/1 dashicons !important;
|
||||||
|
content: "\f179";
|
||||||
|
padding: 0;
|
||||||
|
margin: 0.1rem 0 0 -1.5rem;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
45
search.php
45
search.php
|
@ -15,14 +15,45 @@ get_header();
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
<h1 class="page-title">
|
|
||||||
<?php
|
|
||||||
/* translators: %s: search query. */
|
|
||||||
printf( esc_html__( 'Search Results for: %s', 'ofisuport' ), '<span>' . get_search_query() . '</span>' );
|
|
||||||
?>
|
|
||||||
</h1>
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// check if is ofisuport-ajut
|
||||||
|
if ( get_post_type( get_the_ID() ) == 'ofisuport-ajut'){ ?>
|
||||||
|
<section id="filteredfunds" class="ofisuport-filtered-funds ofisuport-ajuts-filtrats">
|
||||||
|
<aside id="fundsfilter" class="ofisuport-filter-funds ofisuport-fitre-ajuts">
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
<!-- https://stackoverflow.com/a/48314274 -->
|
||||||
|
(function($) {
|
||||||
|
$('.fund-filter').ready(function() {
|
||||||
|
$('.oficinasuport-titol-opcions').click(function() {
|
||||||
|
$(this).siblings(".filter").toggle();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
|
</script>
|
||||||
|
<?php ofisuport_ajuts_filters_form(); // function defined in the plugin ?>
|
||||||
|
|
||||||
|
</aside>
|
||||||
|
<?php } elseif ( in_category ( 'faq' ) ) { ?>
|
||||||
|
<section id="filteredsearch" class="ofisuport-searched-query ofisuport-search-faqs">
|
||||||
|
|
||||||
|
<?php //if( in_category('faq') ) : ?>
|
||||||
|
<?php ofisuport_display_faqs_labels(); ?>
|
||||||
|
<?php ofisuport_display_faqs_search(); ?>
|
||||||
|
<?php //endif; //end if is_category faq ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
<section id="filteredsearch" class="ofisuport-searched-query">
|
||||||
|
<?php
|
||||||
|
/* translators: %s: search query. */
|
||||||
|
printf( esc_html__( 'Search Results for: %s', 'ofisuport' ), '<br/><span class="h5 search-query">' . get_search_query() . '</span>' );
|
||||||
|
?>
|
||||||
|
<?php }; // end if is ofisuport-ajut ?>
|
||||||
|
<content class="archive-posts <?php ofisuport_class_posttype(); ?>">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* Start the Loop */
|
/* Start the Loop */
|
||||||
while ( have_posts() ) :
|
while ( have_posts() ) :
|
||||||
|
@ -46,6 +77,8 @@ get_header();
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
</content>
|
||||||
|
</section>
|
||||||
</main><!-- #main -->
|
</main><!-- #main -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
35
style.css
35
style.css
|
@ -958,6 +958,36 @@ input[type="submit"]:focus,
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ofisuport-search-form {
|
||||||
|
display: flex;
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ofisuport-search-form .search-field {
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ofisuport-search-form .search-submit {
|
||||||
|
border: none;
|
||||||
|
margin: 0rem;
|
||||||
|
font-size: 0px;
|
||||||
|
width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
background: none;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ofisuport-search-form .ofisuport-icon-search:before {
|
||||||
|
z-index: 0;
|
||||||
|
min-width: 2.5rem;
|
||||||
|
min-height: 2.5rem;
|
||||||
|
font: normal 2rem/1 dashicons !important;
|
||||||
|
content: "\f179";
|
||||||
|
padding: 0;
|
||||||
|
margin: 0.1rem 0 0 -1.5rem;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
input[type="text"],
|
input[type="text"],
|
||||||
input[type="email"],
|
input[type="email"],
|
||||||
input[type="url"],
|
input[type="url"],
|
||||||
|
@ -1582,12 +1612,17 @@ textarea {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 48em) {
|
@media screen and (max-width: 48em) {
|
||||||
|
<<<<<<< HEAD
|
||||||
|
.ofisuport-filters section {
|
||||||
|
display: inline-block;
|
||||||
|
=======
|
||||||
.post,
|
.post,
|
||||||
.page {
|
.page {
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
}
|
}
|
||||||
.ofisuport-filters section {
|
.ofisuport-filters section {
|
||||||
display: block;
|
display: block;
|
||||||
|
>>>>>>> dev
|
||||||
}
|
}
|
||||||
.ofisuport-filters section h5 {
|
.ofisuport-filters section h5 {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
<?php the_title( sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' ); ?>
|
||||||
|
|
||||||
<?php if ( 'post' === get_post_type() ) : ?>
|
<?php if ( 'post' === get_post_type() ) : ?>
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
|
|
Loading…
Reference in New Issue