customizer live preview layout picker

You don’t need javascript, just change the class using the get_theme_mod variable e.g. <?php $layout = get_theme_mod(’embee_layout_section_options[site_layout]’, ‘3’); $class=””; if($layout == ‘1’) { $class=”this”; } elseif($layout == ‘2’) { $class=”that”; } ?> <div class=”<?php echo $class; ?>”> // stuff </div> Put that in your template file e.g. page.php and the live customizer will pick it … Read more

Basic PHP question (displaying post title over thumbnail) [closed]

You don’t need php at all to achieve what you are after. This can be done with just css. This shows the title and excerpt by default. .wrap .wp-tiles-byline-fade-in .wp-tiles-tile-with-image .wp-tiles-byline { opacity: 1; } This hides the excerpt again now that we have revealed it. .wrap .wp-tiles-byline-fade-in .wp-tiles-tile-with-image .wp-tiles-byline .wp-tiles-byline-content { opacity: 0; } … Read more

301 redirect from webpage to wordpress page in the same root

Here’s the trace results. http://coinauctionshelp.com/United_States_Coin_Mintages_Price_Guides.html HTTP/1.1 500 Internal Server Error Date: Fri, 01 Jul 2016 22:24:27 GMT Server: Apache Last-Modified: Mon, 25 Apr 2016 21:39:43 GMT ETag: “38150-117-5315603b9a5c0” Accept-Ranges: bytes Content-Length: 279 Vary: Accept-Encoding Content-Type: text/html Connection: close

Updating meta_value in a custom key

The problem is this line $sales = get_user_meta($_POST[‘repID’], ‘sales’); change it to $sales = get_user_meta($_POST[‘repID’], ‘sales’, true); The last parameter says, that you are getting a single value – an array. Otherwise you get an array inside another array. https://developer.wordpress.org/reference/functions/get_post_meta/ EDIT: After reading the comments, as you have the meta in multiple rows, you should … Read more

Permalinks and custom PHP application

(EDIT) Take the custom rules outside the # Begin WordPress (credit to Tim Malone) You can check if the file exists in the root and load it before the WordPress rules kick in: # check for a file, i.e register.php # load it if found and stop processing the rest of the rules with the … Read more