Mrskt
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Blocksy] Featured Image from Custom field value@creativethemeshq I was using that code to place images through external URL by getting value from the custom field on archive pages whose posts don’t have featured image.
I am facing one more problem,
post_tag
taxonomies are not showing in the archive page on the custom post type.I have already enabled the option to show the post meta of post tag taxonomy in my theme customiser and the post tag is showing in the singular post of
blogger-template
post type, but not in the loop of archive pages.Forum: Themes and Templates
In reply to: [Blocksy] Featured Image from Custom field valueHello, I got this code which working:
//featured image with custom field image for blogger-template post type function display_blogger_template_thumbnail( $html, $post_id ) { if ( get_post_type( $post_id ) == 'blogger-template' ) { if ( has_post_thumbnail( $post_id ) ) { return $html; } else { $bt_image_url = rwmb_get_value( 'bt_image_url', $post_id ); $alt_text = 'Check Out ' . rwmb_get_value( 'bt_name', $post->ID ) . ' Premium Blogger Template'; if ( ! empty( $bt_image_url ) ) { return '<img src="' . esc_url( $bt_image_url ) . '" alt="' . esc_attr( $alt_text ) . '">'; } } } return $html; } add_filter( 'post_thumbnail_html', 'display_blogger_template_thumbnail', 10, 2 );
But, my question is these images not come under
<a class="ct-image-container boundless-image"
element like other posts which has already featured image. And also width and height attributes is missing.Should I’ve to modify this code:
return '<img src="' . esc_url( $bt_image_url ) . '" alt="' . esc_attr( $alt_text ) . '">';
Forum: Themes and Templates
In reply to: [Blocksy] Page not Found Error on My All PagesHi @cteduard , No I am using this custom code only to Display some custom post types in homepage.
Is there anyway to Not Run That Custom Code in Pages?
Forum: Themes and Templates
In reply to: [Blocksy] Page not Found Error on My All PagesI found this problem happened from this code
add_action('pre_get_posts', 'add_my_custom_post_type'); /** * @param WP_Query $query * @return WP_Query */ function add_my_custom_post_type($query) { if( empty($query->query['post_type']) or $query->query['post_type'] === 'post' and !is_admin() ){ $query->set('post_type', array('post', 'tutorial', 'review', 'collection')); } }
Which I was inserted in blocksy child theme, can you give any solution?
Forum: Themes and Templates
In reply to: [Blocksy] How to Display Custom Post type on Homepage?@cteduard @creativethemeshq I want to do it without making custom homepage.
Is there any Action/filter/function to show custom post types in homepage just like default post type.
Forum: Plugins
In reply to: [WooCommerce] Display Product’s Download File Name, Size & Type@rainfallnixfig That’s What i asked, i just want to know which code show downloadable files information?
Forum: Fixing WordPress
In reply to: Open Posts without reloading the Page@gappiah I am asking about Ajax Post “Content” Loading/Opening not scrolling.
Forum: Themes and Templates
In reply to: [Blocksy] Where is search.phpGenerally, you can override that template for achieving what you say. But this isn’t always a good idea. Better to just show us where exactly you need to add the custom content and we’ll give you a proper solution.
Ans: I will make two Tabs in search result, In one tab Site results will show and in another tab Google (CSE) results will be show.
And that’s why i want a code snippets to display search results in one tab.
That’ll
Forum: Themes and Templates
In reply to: [Blocksy] Where is search.php@cteduard No, I haven’t find anything at searchform.php…
Forum: Themes and Templates
In reply to: [Blocksy] Where is search.phpI just want to know which code/function name is used to render search results content and i want to replace whole container of search page with mine custom code’s content, Can you tell?
Forum: Themes and Templates
In reply to: [Blocksy] Where is search.php@cteduard How can i add custom php code in search template? Is there any way do it?
Forum: Fixing WordPress
In reply to: Append external domain to Image URLs@sanchitvarshney It’s not working, please check your code
Forum: Fixing WordPress
In reply to: Automatically Create Download Links Page of Posts in WordPressHello @soberbanda , That’s not my question
Forum: Plugins
In reply to: [WooCommerce] Display Product’s Download File Name, Size & TypeHi @abwaita I just wanted the code/hooks/filters, please share if you know otherwork i will do from my self.
Forum: Plugins
In reply to: [WooCommerce] Gutenberg editor for product pagesCopy and Paste Below Codes in theme’s functions.php
To Enable Gutenberg Editor in WooCommerce Post Editor// Enable Gutenberg in WooCommerce function activate_gutenberg_product( $can_edit, $post_type ) { if ( $post_type == 'product' ) { $can_edit = true; } return $can_edit; } add_filter( 'use_block_editor_for_post_type', 'activate_gutenberg_product', 10, 2 );
That’s all