SSL certificate breaks CSS (in combination with W3TC)

Dear StackExchange community, I am struggling with the following problem and simply cannot find a solution: I have installed a SSL certificate but it causes the CSS of my website to break when the plug-in « W3TC » is activated (example: https:// www.planetofsuccesscom/blog/). Here’s how I installed the certificate and how I tried fixing the problem: Deactivated W3TC Updated my site URL to https within the WordPress dashboard (Settings » General and updating your WordPress and site URL address fields) Redirected http to https via .htaccess file with the following code: RewriteEngine…

I have cloudflare flexible enabled, How to redirect to https for Nginx server

If I access directly to https it works, but the site is still accessible by HTTP. How do I force all http to https? I have used WordPress HTTPS plugin. But it is not redirect to https. I have configured the nginx with following: server { listen xxx.x.xxx.xxx:80; listen 127.0.0.1:80; server_name mydomain.com; root /var/www/html/mydomian.com/; index index.html index.htm index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$args; rewrite ^(.*)$ https://$http_host$request_uri redirect; } … But this redirection will leads to infinite loop. I installed the CloudFlare Flexible SSL, which said to…

Numeric pagination custom post type

i create a custom page to display loop of cpt with custom field. I need to add a numberic pagination and i try with this code but not work. Functions.php function pagination_bar() { global $wp_query; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1){ $current_page = max(1, get_query_var(‘paged’)); echo paginate_links(array( ‘base’ => get_pagenum_link(1) . ‘%_%’, ‘format’ => ‘/page/%#%’, ‘current’ => $current_page, ‘total’ => $total_pages, )); } } custompage.php <!–Loop Salmi–> <?php $paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1; $loop = new WP_Query( array( ‘post_type’ => ‘salmi’,…

Create Meta boxes dynamically

I followed and created a meta box using all code from this question here: Create more Meta Boxes as needed Basically only two fields are created when you click on Add track button: Song title field – Track number field But I need something like that: Add album name button – add a field for a album name; Add track number button – add a field for track number; This is my code right now: add_action( ‘add_meta_boxes’, array( $this, ‘dynamic_add_custom_box’ ) ); /* Do something with the data entered */…

How to get sidebar widgets in leftsidebar template

I have created a custom sidebar widgets using below code : register_sidebar(array( ‘id’ => ‘sidebar-widget-1’, ‘name’ => ‘Sidebar Widget 1’, ‘before_widget’ =>  », ‘after_widget’ =>  », ‘before_title’ =>  », ‘after_title’ =>  », )); and it is showing in Appearance -> Widgets and it is also showing content on frontend using dynamic_sidebar(‘Sidebar Widget 1’). But I want to get content of this register_sidebar by using its id into a variable. How to get sidebar content by using its id? Source: https://wordpress.stackexchange.com/feeds

Adding thumbnail to search results & changing content.php

Looking to discover how to alter my content.php code to add the thumbnail image of the specific posts to my search results located here for example: https://divesummit.com/?s=suunto&submit=Search I would like a thumbnail of the featured post’s image listed along with the smaller blurb of the post in the search results. <?php get_template_part( ‘content’, get_post_format() ); ?> by somehow changing content.php I can have it include a small thumbnail along with each search result. My theme already has thumb support I just need help implementing it. Any help on doing this…

Permalink with anchor on home page to single page

I have question regarding the permalink on my home.php page. How can I make link in home.php page which goes to certain post – so kind of jump automatically to certain area in my single.php page with 12 post on one page. So it will be kind of permalink with anchor together Source: https://wordpress.stackexchange.com/feeds

Get_theme_mod not retrieving value

I’m using the WordPress customizer feature to configure my theme and I constantly bumping into the same annoying issue, sometimes I don’t get any value from get_theme_mod while I see the effect of my change in the preview window. Here is some code: $active_type= »home »; $wp_customize->add_setting($active_type.’_categories_max’,array( ‘default’ => ’10’, ‘transport’ => ‘refresh’ )); $wp_customize->add_control( $active_type.’_categories_max’,array( ‘type’ => ‘select’, ‘label’ => ‘Max Items’, ‘section’ => $active_type.’_categories_section’, ‘choices’ => array( ‘5’ => ‘2’, ’10’ => ’10’, ’15’ => ’15’, ’20’ => ’20’, ), )); on my php page, I have: $test = get_theme_mod(‘home_categories_max’);…

Multiple custom fields for ‘orderby’ in ‘WP_Query’

I am trying to order blog posts by ‘city’ first and then order by ‘street_name’ within each city. I can’t seem to get the ‘street_name’ to display in alphabetical order. I am using WP_Query: <?php $args = array( ‘post_type’=> ‘property’, ‘meta_query’ => array( array( ‘relation’ => ‘AND’ , array( ‘meta_key’ => ‘city’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’ ), array( ‘meta_key’ => ‘street_name’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’ ), ) ), Any ideas? Source: https://wordpress.stackexchange.com/feeds