Deleting Widgets in sidebar in Panthea theme

Generaly using admin panel you can remove side bar widget go to Apperance=>widgets in that you wil see the name Main sidebar name in that box you will have the sidebar click and drag through left side or click and delete it. This is based for all the themes check it let you know for … Read more

Bad theme code – can you find the error?

OK, I’m just going to list things out as I go through. Some of what follows is stylistic feedback, some is security related, some is functional: <div class=”home-featured-block”> <?php $featured_block=$profitmag_settings[‘featured_block_one’]; $no_of_block=$profitmag_settings[‘no_of_block_one’]; I don’t know what the $profitmag_settings variable looks like, but either of these parameters could be unset. Instead of just assuming they exist, you … Read more

How are my own themes updated?

You can use this ThemeUpdateChecker class Basic outline of the process: Have a fixed spot on your server to both house a little bit of data about the current version and a zip of your theme files. Hook an action into pre_set_site_transient_update_themes In that action, ping your server (with something like curl) Compare the versions … Read more

How to include a new file in theme

Lets take a look in the twentysixteen theme. Line 18/19 (inside the loop) of single.php shows actualy all you need/want to know, it uses: get_template_part( $slug, $name ); // Include the single post content template get_template_part( ‘template-parts/content’, ‘single’ ); That means actualy for WP: Get a (partial) template for a (in this case) single post. … Read more

How can i display wath i am searching in a theme

Add the following code to your template’s search.php – somewhere before the loop: <?php global $wp_query; echo ‘Your results retrive (‘.$wp_query->found_posts.’ posts) with the subject ‘.get_search_query().’.’; ?> If search.php does not exists in your template’s directory, either copy archive.php (if it does not exists too, copy index.php – see template hierarchy) and rename it to … Read more

Two types of layout in woocommerce SHOP page [closed]

Set a button, or dropdown menu, that calls a function to set a cookie and to switch between CSS files which contain the _style ID: function switchStyle(style) { var file = $TMPL_URL + ‘/css/’ + style; jQuery(‘head’).append(‘<link rel=”stylesheet” href=”‘ + file + ‘” type=”text/css” />’); jQuery.cookie($TMPL_NAME + ‘_style’, style, { expires: 365, path: “https://wordpress.stackexchange.com/” }); … Read more

How to add breadcrumbs to any WordPress theme

Try a breadcrumbs plugin. Breadcrumb NavXT is a popular option I believe. An alternative solution of is just printing the name of the current page. Here’s what such a function might look like in its most basic form: function wpse_87332_nav_identifier() { $page_name = get_the_title(); echo “You are here: ” . $page_name; } Note that this … Read more