Articles of themes

Can I assign a theme to a custom post type?

I have created a custom post type via plugin called landing-pages with a slug /landing/. I would like to assign a theme when the visitor visited a site with the slug /landing/ and when he visited a normal site should use the default theme. Thanks

Methods for development wordpress themes

Analyzing the code from WordPress themes, both free and paid for, and realized that there is no standard for the development of themes. Some themes use CPT for all other widgets, other Visual Composer (and dirty code) and so on. I know WordPress, studying hard and already making my themes and I am honestly confused […]

Get images / media attached to a page by page ID

I have a series of pages which have images included on them by means of the HTML editor in the admin area. I need to access these while NOT on the the actual page in question, i.e, I need to access these images by the page ID. I’ve tried using the following: $all the images […]

In a Gallery with limited image posts, how do I not limit images on single post?

I created a function for a theme that limits the amount of images displayed in a gallery. This is within the Gallery post format. However, I want to limit gallery images on all pages except for the single post. My code so far is the following (shortened with the parts that are specific to the […]

Shortcodes do not work in own template

I have a big problem rendering shortcodes in my template I designed for my Tennis Club which works fine. However, now I wanted to integrate the standard WordPress Gallery, which is implemented by a shortcode but the shortcode is not being displayed as a normal Gallery, it is displayed as a text without any images. […]

unnecessary request call for js and css after calling wp_dequeue_script

called unnecessary js and css request http://www.example.com/wp-content/plugins/includes/js/jquery.form.min.js http://www.example.com/wp-content/plugins/includes/js/scripts.js orignal it was http://www.example.com/wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js http://www.serpentcs.com/wp-content/plugins/contact-form-7/includes/js/scripts.js this is happen after i written a function in function.php // below function is used to deque script on certain page function wpa_scripts() { // if this is not the contact page, remove the script if(!is_page(‘contact-us’) ){ wp_dequeue_script( ‘contact-form-7’ ); // only […]

Updating WordPress Theme Files

How do you update a site’s theme files which has a child theme active? And can you do it entirely from the front end?

Programmatically create and place a nav menu in a theme location?

A client has numerous subsites and would like to include a ‘global menu’ within the packaged theme. I’ve got a registered location global-menu and I’ve got it populated with links in functions.php. Which action do I use to place that menu inside of the theme location?

Render a Post or Page using the correct file

Assuming I have a post ID or object, how do I display it the way it would be displayed if accessed directly within WordPress? My main concern with this is that there are numerous ways to change the file that is used for displaying a post. Specific files (page-slug.php), post types, etc. In my specific […]

WordPress Fatal error: Call to undefined get_header() in index.php on line 15

I downloaded a wordpress theme recently and i tried to run it but it gives me an fatal error shows that call to undefined fatal error(). Why this error generates ? I am a new bie to wordpress theme development.Here are my index.php and header.php scripts.Please some can help to get rid of this error. […]