Hot answers tagged

4

get_post_format and get_post_type are completely different. Post Formats can be one of the following: 'standard' (default one) 'aside' 'chat' 'gallery' 'link' 'image' 'quote' 'status' 'video' 'audio' And shopping is the post type you have created and not post format. You can add post format for the post type(shopping) like this add_post_type_support( '...


2

I found solution! A Monkeyman Rewrite Analyzur plugin was very helpful: https://wordpress.org/plugins/monkeyman-rewrite-analyzer/ So now, I have such working urls... single.php: /magazine-name/issue-year/issue/article-name archive.php: /magazine-name/issue-year/issue /magazine-name/issue-year /magazine-name On a custom post editor page in wp-admin I ...


1

You will need to store the field value in a variable and use the get_field() instead of the_field() function. From there you can introduce your own custom control structure to set the color you want. Here is a snippet <?php //store the value in a variable first $option = get_field("status"); if($option=="K dispozicii"){ ?> <...


1

When you are concatenating string you shouldn't use ;after the method. Also you should close que quotes, call the method, and open again. Try the code below: $listItem .= '<div id="agenda-block-image-responsive" style="' .get_field('speaker-img' ) . '">';


1

You can't without hooking a filter to recognise the files in your plugin BUT you can hook into the template_include filter and register your own file e.g. add_filter('template_include', 'my_function_name'); function my_function_name( $template ) { if( is_post_type_archive( 'post_type' ) ){ $template = dirname( __FILE__ ) . '/templates/archive-post_type....



Only top voted, non community-wiki answers of a minimum length are eligible