Url rewriting on custom post with CPT UI plugin
Go through the Category base and Tag base title of Using Permalink url.
Go through the Category base and Tag base title of Using Permalink url.
This is a hard one to answer without opinion entering into the equation. Generally speaking, having a staging or development site to merge the two into is best practice. You can either build this site on your own server (as you’re currently trying) or on the client’s server (where you may be able to work … Read more
I found the solution <?php $costumepost = “12709”; // args $args = array( ‘numberposts’ => -1, ‘post_type’ => ‘post’, ‘cat’ => array(18), ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘costumeid’, ‘value’ => $costumepost, ‘compare’ => ‘=’ ), ) ); // query $the_query = new WP_Query( $args ); ?> <?php if( $the_query->have_posts() ): ?> … Read more
WordPress stores the site URL in a few places in the database in serialized arrays, which can break if you do a simple search & replace on the database. You need to use a tool like this which is aware of serialized arrays to do the replacement. You can bypass the broken URLs enough to … Read more
How can I change the default image behavior?
You can use options to customize this for every site. Options are stored separately for each site. So, inside your header you can do something like <?php $login_link = get_option(“worduoso_login_link”); $login_text = get_option(“worduoso_login_text”); ?> and then print it like this <?php if($login_link && $login_text): ?> <div class=”added-header”><a href=”https://wordpress.stackexchange.com/questions/273810/<?php echo $login_link; ?>”><?php echo $login_text; ?></a></div><?php endif; … Read more
The built in post type definitions aren’t stored in the database, they’re registered on every request, just like custom types. There’s no way around this. If you just want to check the request and your logged in state as early as possible, you can use the parse_request action: function wpd_parse_request( $request ) { if( !is_user_logged_in() … Read more
<?php $terms = get_the_terms( $post->ID , ‘swatches-category’ ); foreach ( $terms as $term ) { echo $term->name; } ?> That solved it! 🙂
I resolved it by using get_woocommerce_term_meta $terms = get_terms( array( ‘taxonomy’ => ‘pa_texture’, ‘hide_empty’ => false, )); foreach ( $terms as $term ) : $thumbnail_id = get_woocommerce_term_meta( $term->term_id, ‘pa_texture_swatches_id_photo’, true ); $textureImg = wp_get_attachment_image_src( $thumbnail_id, ‘full’ ); ?> <img src=”https://wordpress.stackexchange.com/questions/274247/<?php echo $textureImg[0]; ?>”> endforeach;
If you’re in JS you can’t use PHP (<?php ?>), you need to another way to get a PHP variable into JS. The normal way with WordPress is to use wp_localize_script(). wp_localize_script( ‘wpse_274344’, ‘myScriptObject’, array( ‘markerImageUrl’ => get_theme_file_uri( ‘/img/mapmarker.png’ ), ) ); Add that code after your call to wp_enqueue_script() or wp_register_script(). Replace wpse_274344 with … Read more