Articles of theme development

How to add sidebar to Isola theme?

I am using Automattic’s own Isola theme on my blog. It’s a single column theme and it has a sidebar which pops up from the left if clicked on show more kind of button on the left side of site title. Somehow I managed to disable the sidebar by removing the linking javascript event and […]

How to add pages in wordpress using codes?

I am trying to add wordpress pages using codes on theme activation. But the main problem is i cannot check whether the page with that particular slugs exist or not. Our code looks like this : add_action(“after_switch_theme”,function(){ if(is_page(‘all-post-list’)){ return; }else{ wp_insert_post([‘post_title’ =>’List Of All the Posts’,’post_status’=>’publish’,’post_name’=>’all-post-list’,’post_type’=>’page’,’page_template’=>’All Post List’]); return; } }); This hook is inserted […]

Mark menu item as current-menu-item for category

I have some categories on my WP website. When users sees this categories and posts from them i want to mark one of menu items as active. How can i set one of my menu items to have class “current-menu-item” for this categories and posts?

Create fixed static pages

I have inside a theme two important static pages. One is a confirmation page (after signing up for a newsletter) and the other one is a thank-you page. I am using these in various functions and create them upon theme install with predefined content. The problem is some users tend to change the slug, or […]

How to get terms for taxonomy

how to get all terms for my taxonomy customcategorie i tried with this code i tried to keep code in taxonomy.php <?php /* Template Name:Taxoo */ get_header(); ?> <?php $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); ?> <h2> <?php $args = array( ‘type’ => ‘post’, ‘child_of’ => 0, ‘parent’ => 0, […]

Menu dispareing when visititing current page

I’m using the following code to produce a menu in a WordPress theme that I’m building. Each time I visit a page, that page’s link within the menu is being removed. <?php /** * Displays a navigation menu * @param array $args Arguments */ $args = array( ‘theme_location’ => ‘primary’, ‘menu’ => ”, ‘container’ => […]

Different themes on one site

I’m correctly developing my own theme and so far I got: index, header, footer, functions and style files. The list will go on as I’m progressing with my theme. But I’m considering to use more than one theme at this site with total different files and I’m thinking of using simply different names for files […]

Short code not working in boostrap modal dont no why?

I am trying to put a pluign into a short code it works on the page but when i try to insert it into a modal popup it doesnt render correct at all. <div id=”thanks” class=”modal fade” tabindex=”-1″ role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true”> <div class=”modal-dialog”> <div class=”modal-content”> <div class=”modal-header”> <button type=”button” class=”close” data-dismiss=”modal” aria-hidden=”true”>×</button> <h4 class=”modal-title”>Redeem Points</h4> […]

Theme Check errors of theme code

We are receiving these errors while we check out theme using ThemeCheck. We never seen this before and note sure what they mean or how to solve them. Can anyone so kind to tell us about these and some details on solution please: https://www.dropbox.com/s/dfbnxp4952zm8f8/0001.png?dl=0 https://www.dropbox.com/s/3oque6dw2ip0yo1/0002.png?dl=0 Thanks alot

How to add a second stylesheet to the editor

Is it possible to add another stylesheet from my theme directory, to the Appearance > Editor screen?