-
Search Results
-
Topic: New Custom Post Types
I tried putting this in my child theme’s functions.php, and it’s not throwing any errors, but it breaks the media library. Any ideas of how I could create a custom post type?
<!-- new post type = Proud Bulldog Business --> <?php /* * Creating a function to create our CPT */ function custom_post_type() { // Set UI labels for Custom Post Type $labels = array( 'name' => _x( 'Bulldog Businesses', 'Post Type General Name', 'twentytwenty' ), 'singular_name' => _x( 'Bulldog Business', 'Post Type Singular Name', 'twentytwenty' ), 'menu_name' => __( 'Bulldog Businesses', 'twentytwenty' ), 'parent_item_colon' => __( 'Parent Business', 'twentytwenty' ), 'all_items' => __( 'All Businesses', 'twentytwenty' ), 'view_item' => __( 'View Business', 'twentytwenty' ), 'add_new_item' => __( 'Add New Business', 'twentytwenty' ), 'add_new' => __( 'Add New', 'twentytwenty' ), 'edit_item' => __( 'Edit Business', 'twentytwenty' ), 'update_item' => __( 'Update Business', 'twentytwenty' ), 'search_items' => __( 'Search Business', 'twentytwenty' ), 'not_found' => __( 'Not Found', 'twentytwenty' ), 'not_found_in_trash' => __( 'Not found in Trash', 'twentytwenty' ), ); // Set other options for Custom Post Type $args = array( 'label' => __( 'businesses', 'twentytwenty' ), 'description' => __( 'Proud Bulldog Businesses', 'twentytwenty' ), 'labels' => $labels, // Features this CPT supports in Post Editor 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ), // You can associate this CPT with a taxonomy or custom taxonomy. 'taxonomies' => array( 'genres' ), /* A hierarchical CPT is like Pages and can have * Parent and child items. A non-hierarchical CPT * is like Posts. */ 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', 'show_in_rest' => true, ); // Registering your Custom Post Type register_post_type( 'businesses', $args ); } /* Hook into the 'init' action so that the function * Containing our post type registration is not * unnecessarily executed. */ add_action( 'init', 'custom_post_type', 0 ); ?>Hi from Slovakia. I use Enfold for our online shop. Everything is OK but I have one problem. Online shop: 1200 products – uploaded 5000 multimedia files / size of one on average 300-400 kb. Nevertheless, our online shop is over 20 GB in size (18 GB uploaded multimedia files) (!) We checked the installed plugins, but we didn’t find a problem. Could this be a problem with the template? Doesn’t it make many copies of different thumbnails? (5000 multimedia files have been uploaded, but EWWW Image Optimizer show over 100000…) Do you know the solution? Thanks for reaction.
Hi there.
Want to insert a VideoAsk widget into our website.
When I add the script code into either a main page (e.g. Home), or via a plugin (e.g. Header & Footer scripts) the widget works on desktop but not on mobile – in that, it shows on mobile but the play function doesn’t work.
Guidance from VideoAsk is (I’ve removed part of it for security reasons on this forum, denoted XXXXXXXXXXX):
<!– Add the code below inside the <body> tags of your HTML page –>
<script>
window.VIDEOASK_EMBED_CONFIG = {
“kind”: “widget”,
“url”: “https://www.videoask.com/ XXXXXXXXXXXXXX “,
“options”: {
“widgetType”: “VideoThumbnailExtraLarge”,
“text”: “Talk to us”,
“backgroundColor”: “#B5055A”,
“position”: “bottom-right”,
“dismissable”: true
}
}
</script>
<script src=”https://www.videoask.com/embed/embed.js”></script>
<!– Important!!! In order to allow your videoask to open up on the same page when interacting with the widget, your website must use the secure https:// protocol (i.e have an SSL certificate). Otherwise, when clicking the widget, a new tab will be automatically opened in the browser.Any ideas please?
Thanks in advance.
Topic: Images aren't responsive
Hi,
All thumbnails aren’t responsive, unfortunately, i.e. in a category, in a post slider etc.
Could you please help me to fix that issue?
I can send you screenshots if you need them.
Enfold ver. 4.7.6.4
PHP ver. 7.3.25
WordPress ver. 5.5.3Thanks a lot.
Hi,
I recently checked some of my Enfold websites because of huge media image files reported in page speed tests.It seems to differ from the uploaded original image size (e.g. more than 1600 px width) how many thumbnails are created by Enfold automatically. I found up to 19 thumbnails!
1) Is it possible to enable this or to reduce the number of thumbnails without having any issues?
2) Most of the uploaded images are already optimized when uploaded and the curious thing is, that the first generated thumbnails are much bigger than the original and increase their file sizes up to more than 4 times!
3) dpi changes sometimes from original to thumbnail from 72 dpi to 96 dpi which is also increasing the file sizes.Example: Original 1461 x 727px (107.7 KB), thumbnail: 1461 x 630px (352 KB!), the first thumbnails with lower file size than the original start only at 300 x 300 px
We have websites with huge media libraries which increase a lot by this and influence the website performance. Any page speed test is reporting these thumbnail file sizes.
Any help is highly appreciated.
Best regards
Topic: Header not shrinking
Hello enfold theme.
My header does not shrink actually. The shrinked size of the logo is shown from the beginning. Please help.
http://www.photoart-huebner.deBest regards
Marcus
Update: Can be closed – after Updates the Logos used were thumbnails. Changed it and now its fine again! THX
Topic: Featured image not loading
Hi,
We are having this issue for last 1 month and tried everything possible before opening this ticket –
We are not able to upload featured image to our blog posts. Pls follow these steps to reproduce the issue:
- Go to Posts and create a new post.
- Click on featured image in the image section in the right.
- Try uploading an image.
- The image uploads but the thumbnail is not visible.
- It still allows me to select that image as featured image. But after I do that, there is no featured image showing in the post.
I have recorded this flow and you can check on https://www.awesomescreenshot.com/video/1992123?key=d9e29bd0336c0b0ef5190df5c9f66c03
We have checked with our host (hostgator) and they said there is no issue. We tried various combinations of WP version/ PHP version, disabling plugins to see if one of them was an issue but it did not solve the issue. We also created a copy of the site on a staging site, but it is working on staging so we are not able to troubleshoot.
Can you please have a look and see if you can figure something out?
Thanks,
PriyankaHi,
I wondered if somebody could help me with the way the site is displaying the images in our posts and category pages.
We normally try and keep the main image for a post when we upload it to 1200×630 as the dimensions work well for social media shares etc. When we upload the image as the feature image in a post it creates all the different sizes. The issue is on a post it then displays the image at the top as the ***-845×321.png version which is the incorrect version as it isn’t a multiple of 1200×630 and means the top and bottom of the image get chopped off. Looking at all the versions that are generated I think it should be the ***-.768×403.png version (correct me if I’m wrong here) that is displayed as this is a correct multiple and looking at this version there is nothing that has been cropped – How do we change it so the posts use that version?
Similarly, on our archive/category page, it is displaying the 495×400 version for the thumbnail which is too square, for the thumbnail based on our feature image size I think it should be the 300×158 version, could you tell me how we change this too, please?
Thanks,
Danny

