<?php
$cur_terms = get_the_terms($post->ID, 'metki');
if (is_array($cur_terms) && !is_wp_error($cur_terms)) {
foreach ($cur_terms as $cur_term) {
$term_link = get_term_link((int) $cur_term->term_id, $cur_term->taxonomy);
// If there was an error, continue to the next term.
if (is_wp_error($term_link)) {
continue;
}
echo '<a href="' . esc_url($term_link) . '">' . $cur_term->name . '</a> ';
}
}
?>
<?php $post_id = get_field('page_link', false, false);
if( $post_id ): ?>
<a href="<?php echo get_the_permalink($post_id); ?>"><?php echo get_the_title($post_id); ?></a>
<?php endif; ?>
<?php
$post_object = get_field('page_link');
if( $post_object ):
global $post;
$post = $post_object;
setup_postdata( $post );
?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
RewriteCond %{REQUEST_URI} !^/kontaktyi/$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteCond %{REQUEST_URI} !^/en$
RewriteCond %{REQUEST_URI} !^/en/$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://site.com/$1 [L,R=301]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
$place = get_field('place_near');
плагин "Advanced Custom Fields" сделать такого не может
Есть ли плагины, в которых мы могли бы принудительно задать ссылку?
То-есть мне нужно будет еще 2 раза прописывать весь код в функ.пхп, меняя названия?
add_filter( 'wp_insert_post_data', 'filter_post_data', 99, 2 );
function filter_post_data( $data , $postarr ) {
$post_content = $data['post_content'];
$data['post_content'] = '[restabs]' . $post_content . '[/restabs]';
return $data;
}
function my_sanitize_content( $content ) {
return '[restabs]' . $content . '[/restabs]';
}
add_filter( 'content_save_pre', 'my_sanitize_content' );
$(window).load(function() {
if($('.variations_form .woocommerce-Price-amount').length && $('.variations_form .woocommerce-Price-amount').text() != '') {
window.setTimeout(function(){
$('p.price .woocommerce-Price-amount').html($('.variations_form .woocommerce-Price-amount').html());
}, 0);
}
$('.variations_form select').change(function() {
if($('.variations_form .woocommerce-Price-amount').length && $('.variations_form .woocommerce-Price-amount').text() != '') {
window.setTimeout(function(){
$('p.price .woocommerce-Price-amount').html($('.variations_form .woocommerce-Price-amount').html());
}, 0);
}
});
});