Customizing WordPress Themes Archives For Categories

Most WordPress Themes users are familiar with tags and categories and with how to use them to organize their blog posts. If you use custom post types in WordPress Themes, you might need to organize them like categories and tags. Categories and tags are examples of taxonomies, and WordPress allows you to create as many custom taxonomies as you want. These custom taxonomies operate like categories or tags, but are separate.

In this tutorial, we’ll explain custom taxonomies and how to create them. We’ll also go over which template files in a WordPress themes control the archives of built-in and custom taxonomies, and some advanced techniques for customizing the behavior of taxonomy archives.

Terminology

Before continuing, let’s get our terminology straight. A taxonomy is a WordPress Themescontent type, used primarily to organize content of any other content type. The two taxonomies everyone is familiar with are built in: categories and tags. We tend to call an individual posting of a tag a “tag,” but to be precise, we should refer to it as a “term” in the “tag” taxonomy. We pretty much always refer to items in a custom taxonomy as “terms.”

Categories and tags represent the two types of taxonomies: hierarchical and non-hierarchical. Like categories, hierarchical taxonomies can have parent-child relationships between terms in the taxonomy. For example, you might have on your blog a “films” category that has several child categories, with names like “foreign” and “domestic.” Custom taxonomies may also be hierarchical, like categories, or non-hierarchical, like tags.

How Tag, Category and Custom Taxonomy Archives Work

For every category, tag and custom taxonomy, WordPress Themes automatically generates an archive that lists each post associated with that taxonomy, in reverse chronological order. The system works really well if you organize your blog posts with categories and tags. If you have a complex system of organizing custom post types with custom taxonomies, then it might not be ideal. We’ll go over the many ways to modify these archives.

The first step to customizing is to know which files in your theme are used to display the archive. Different WordPress Themes have different template files, but all WordPress Themes have an index.phptemplate. The index.php template is used to display all content, unless a template exists higher up in the hierarchy. WordPress’ template hierarchy is the system that dictates which template file is used to display which content. We’ll briefly go over the template hierarchy for categories, tags and custom taxonomies. If you’d like to learn more, these resources are highly recommended .

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress templates

 

Using PHPMyAdmin with WordPress Themes

WordPress Themes PHPMyAdmin – or PMA – is an excellent free, open source web-based database client which can be used to interact more easily with MySQL and WordPress databases. I’ll describe how to install it, secure it and some common scenarios with which it can assist you in WordPress administration. Here’s an online demo of PMAfor you to explore.

In addition to offering a visual GUI for database operations, I also appreciate being able to run command line SQL operations via my browser without having to log in to the server via SSH. For example, some WiFi and mobile connections regularly terminate persistent SSH sessions, making database tasks problematic.

Getting started with PMA is fairly straightforward on Linux. I’ll describe how to do so with Ubuntu 14.x at Digital Ocean. Log in to your server via SSH:

apt-get install phpmyadmin

You can use the default settings during installation or customize them to your liking.

On a typical WordPress installation, there aren’t any direct ports to MySQL for a hacker to try to access. They might try to break in via SSH or try SQL injection attacks against WordPress, but they can’t directly attack the database. Once you install PMA, anyone can run web-based attacks against it in order to gain control of your database, so care is warranted.

There are a few precautions I recommend when configuring PMA.

1. Use very strong passwords for all of your MySQL accounts, especially the root account. e.g. 25 characters for the root password.

2. Use different MySQL accounts and privileges for each WordPress site running on a single server. This way if one WordPress password is compromised, only one site’s database is compromised.

3. Change the default URL used by PMA. This way people can’t visithttp://yourblog.com/phpmyadmin. While this security by obscurity isn’t a very effective technique, it does add some protection.

Add an alias to the apache.conf file:

Reload apache:

service apache2 reload

Then, to access PMA, visit http://yourblog.com/myobscuredpma

If you need to modify your PHPMyAdmin password, you can edit the config-db.phphere:

nano /etc/phpmyadmin/config-db.php

4. Configure Web Authentication for the PMA Site. This will require that you enter an additional password to gain access to PMA, in addition to your database password, like this:

It’s very important to remember that PMA allows you to directly manipulate the WordPress database; that means it’s quite easy to break your WordPress site if you don’t know what you’re doing. It’s especially unwise to apply database scripts from the web unless you understand them completely. Use PMA with great care.

for more: http://code.tutsplus.com/tutorials/installing-and-using-phpmyadmin-with-wordpress–cms-21944

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress templates

 

Powerful WordPress Themes Tips And Tricks

I’ve been working with WordPress since the dawn of time, and even though I peek at the source code regularly, I still discover new tips and tricks. I’ve compiled my own list of 21 techniques that are handy, clever, fun or best practices rarely followed. I hope everyone finds something new in the list!

21 tips

1. WordPress Themes Has A Ton Of Built-In Scripts

Using the great wp_enqueue_script() and wp_enqueue_style(), you can include styles and scripts easily with dependency management. But did you know that WordPress has a lot of scripts already built in? jQuery, many elements of jQuery UI, jQuery Form, SWF Object, Tiny MCE, Jcrop and Thickbox are just some the better known ones. The whole list can be found in the WordPress Codex. If you’re interested in learning how to use the enqueue functions effectively, I recommend “The Developer’s Guide to Conflict-Free JavaScript and CSS in WordPress” right here on Smashing Magazine! WordPress Themes

2. Replace Built-In Scripts By Deregistering Them

If you live on the bleeding edge, you can use versions of scripts other than the built-in ones. Using a newer jQuery version is common (though not necessarily good) practice, which can be done in the following way

But do not do this just to brag about using latest stuff. WordPress includes the version of jQuery that it does to ensure maximum compatibility.

Use another version of jQuery only when encountering compatibility issues, such a plugin that specifically requires it.

3. Force Perfect JPG Images

This is a classic example of why working on a team is beneficial. My good friend Lars told me that WordPress doesn’t use 100% quality for images served on the website, to conserve space and bandwidth. He also showed me a solution, of course:

WordPress uses a default quality of 90%. This is fine in most cases; I doubt many people can see the difference. But if top-notch image quality is a must on your website (for a portfolio, photography, etc.), modifying the value might be best.

4. FeedBurner Redirection

FeedBurner is used on almost every blog that I’ve worked on, and yet I never know how exactly to set it up by heart. Thanks to Elio for writing “10 Tips to Optimize Your WordPress Theme,” which contains this snippet

5. Using General Taxonomy Functions

A number of taxonomy functions can handle your custom taxonomies as well as the built-in tags and categories. The Codex’s reference of functions contains the full list of taxonomy functions. I particularly like using get_term(), get_terms() andwp_get_object_terms(). To make things more modular, I use these functions as much as I can, even for tags and categories.

6. Setting Up Sessions In WordPress Themes

Sessions are great for storing information between pages and are widely used on websites. WordPress doesn’t use them at all internally, so the session is never set. Using the following method, you can start a session on all pages before any output.

Note that, while sessions are generally pretty safe, implement IP checking or added nonce protection just to be on the safe side. As long as you’re transmitting non-sensitive data, though, you’ll fine. Check out Mark Jaquith’s great article on nonces for more info.

from : http://www.smashingmagazine.com/2013/09/26/powerful-wordpress-tips-and-tricks/

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress templates

Create A Tab Widget In WordPress

In this WordPress tutorial, you’ll learn how to create the Tabber widget, which is very useful for when multiple widgets need to fit in a sidebar. It saves space and streamlines the appearance and functionality of your WordPress-powered website.

In the past, there were different methods of doing this, most of which were theme-dependent. As we’ll see in this tutorial, creating a tabbed widget that works on its own and with any theme is easily accomplished. So, let’s jump in and learn how to create our own Tabber widget, which we’ve made available for downloading at the end of this article.

create-tabber-widget-splash

Saving Sidebar Space

The main advantage of tabs is that you can fit more widgets into the sidebar. And tabs look good. The image below shows how much vertical space is taken up by three standard widgets (using the default Twenty Ten theme). The default layout is on the left, and our tabber widget is on the right:

tabber_example

Before We Start

A few things are useful to know. Because we are building a widget in this article, you might want to learn about WordPress’ Widgets API and how to create a basic widget:

Use these resources as needed while following the tutorial along.

The Basic Idea

The idea for this widget is simple: select a sidebar, and the Tabber widget will grab all of its widgets and display them as tabs. In the widget’s interface, you can select a sidebar, specify an extra CSS class and optionally apply your own styles. When enabled, the plugin will register an extra sidebar (which may be removed if you have other ways to add a sidebar). Then, using the same code, you can add more sidebars, and each of them can hold instances of the Tabber widget.

To control your widgets, Tabber uses idTabs for jQuery, created by Sean Catchpole, but you could always use another solution. Note that additional CSS is loaded to style the resulting widget.

So, the goal with Tabber is to transform any widget’s output into markup that can be used to display tabs

tags for this. Other themes may use complicated markup that can’t be predicted or successfully transformed into the output needed for tabs.

The solution to this problem is to intercept the widget’s parameters before rendering, and then to restructure them into useful structures using JavaScript or jQuery for the tabbed output. More on that later.

action. We register the widget on line 17.

Widget Interface
Widget interface.

The Main Tabber Widget Class

Tabber is a normal widget, and in this case it is located

SETTINGS: PLUGIN INTERFACE

The widget has two settings:

  • “sidebar”
    to hold the ID of the selected sidebar
  • “css”
    for extra CSS classes to style the Tabber widget

When selecting which sidebar to use, you must avoid using the sidebar that holds the Tabber widget. Otherwise, it will spin into endless recursion. To avoid this, before rendering the widget’s content, check whether the selected sidebar is the same as the parent sidebar. This can’t be prevented while the widget is set up, because the widget’s panel affords very little control over this.

Also, using sidebars that are not normally used is a good idea. To help with this, the plugin includes sample code to help you add an extra sidebar.

This function requires the name of the sidebar, and it will display all widgets in it. Line 9 contains the check mentioned before, to prevent recursion when displaying sidebar content if the selected sidebar is the same as the parent sidebar.

Lastly, the filter is removed, and any widgets belonging to other sidebars are displayed normally, without modification.

WIDGET MODIFICATION

To prepare for the transformation done with JavaScript, the tabber widget includes the

tag for the control tabs. After this filter, the widget’s output will look like this:

JavaScript For Widget Transformation

Once the widget’s presentation is modified, one thing remains: to complete the transformation and get the titles from the widgets and turn them into tabs:This code uses jQuery to get all of the Tabber widgets based on the

  • will hold only its content.

Final Tabber Example
Final Tabber example.

Finally, when all this is done, we enable idTabs to activate the tabs control. And with the default styling loaded from the

How To Install The Tabber Plugin

As with any other plugin, unpack it, upload it to WordPress’ plugins folder, and activate it from the plugins panel. When you go to the “Widgets” panel, you will see an additional sidebar, “Tabber Example Sidebar,” at the end on the right. And “Available Widgets” will show one more widget, “D4P Smashing Tabber.”

Add this new widget to the “Main Sidebar.” From the “Sidebar” widget drop-down menu, select “Tabber Example Sidebar,” and save the widget. Now, open the “Tabber Example Sidebar” and add the widgets you want to be displayed as tabs. You can add as many widgets as you want, but pay attention because if you add too many, the tab’s control will break to two or more lines, and it will not look pretty. Starting with two or three widgets is best.

Conclusion

Creating one widget to display several other widgets as a tab isn’t very difficult, as you can see. The trick is in adjusting the widgets’ output to a format that can be transformed into tabs, and then using JavaScript to display them. We’ve explored just one possible transformation method; you can always experiment with ways to rearrange widget elements.

We used idTabs here, but there are many methods of displaying tabs, and not all of them require JavaScript:

I prefer using a jQuery-based solution, and idTabs is very easy to use and easy to style and it works in all browsers. Check out other solutions, and see what extra features they offer to enhance your own tabbed widgets.

 

from : http://www.smashingmagazine.com/2014/08/27/a-tour-of-wordpress-4-0/

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress templates

Disable Disqus on Custom Post Types in WordPress

We recently switched from WordPress comments to Disqus comment system on WPBeginner. One of our users pointed out that comments on our custom post types comments weren’t migrated properly. For a temporary solution, we simply disabled Disqus on certain custom post types. In this article, we will show you how to disable Disqus on custom post types in WordPress.

Disqus not showing comments on our custom post types was an error on our part. When importing comment to Disqus, we couldn’t use the normal sync feature because of the size of our site. We had to generate an export file and send it to Disqus to pre-import the comments. This meant that we only did this for posts and not other post types. So when Disqus showed 0 comments on a custom post type item that had 50+ comments, it really was because Disqus didn’t know that it had any comments because we didn’t tell that to Disqus.

So in other words, if you were going to disable Disqus on custom post types because it didn’t work, then maybe you should check your import settings first. But if you want to disable Disqus on custom post types for some other reason, then follow along.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

Before you make any changes make sure that you have enabled syncing between Disqus and WordPress. It is also recommended that you always make a complete WordPress backup of your site before making any big changes.

When you are ready, simply add this code in your theme’s functions.php file or asite-specific plugin.

Don’t forget to replace custom_post_type_name with the name of your custom post type. This code simply adds a filter to check for a specific custom post type and disable Disqus comment template display.

We hope this article helped you disable Disqus on custom post types in WordPress. Also check out how we prevented Disqus from overriding Comments count in WordPress.

If you liked this article, then subscribe to our YouTube Channel or join us on Twitterand Google+.

from :http://www.wpbeginner.com/wp-tutorials/how-to-disable-disqus-on-custom-post-types-in-wordpress/

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress  templates

Fix the Internal Server Error in WordPress

If you have been surfing the web for more than a year, then you probably have seen the HTTP 500 Internal Server Error at least a few times. Internal Server Error is one of the common WordPress errors that can put a WordPress beginner in panic mode. Panic is the worst reaction you can have. Take a deep breath and know that others before you have had this issue as well. We have fixed errors like the internal server error, error establishing database connection, white screen of death, and others many times for our users. We can assure you that they are all fixable. It just requires a little bit of patience. In this article, we will show you how to fix the internal server error in WordPress by compiling a list of all possible solutions in one place.

Internal Server Error in WordPress

Why do you get Internal Server Error in WordPress?

Internal server error is not specific to WordPress, and it can happen with anything else running on your server as well. Due to the generic nature of this error, it does not tell the developer anything. Asking how to fix an internal server error is like asking your doctor how to fix the pain without telling them where the pain is. Having that said, internal server error in WordPress is often caused by plugin and/or theme functions. Other possible causes of internal server error in WordPress that we know of are: corrupted .htaccess file and PHP memory limit. We have also heard internal server error only showing up when you are trying to access the administrator area while the rest of the site works fine.

Lets take a look at how to go about troubleshooting the internal server error in WordPress.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

Checking for Corrupt .htaccess File

The first thing you should do when troubleshooting the internal server error in WordPress is check for the corrupted .htaccess file. You can do so by renaming your main .htaccess file to something like .htaccess_old. To rename the .htaccess file, you will need to login to your site using the FTP. Once you are in, the .htaccess file will be located in the same directory where you will see folders like wp-content, wp-admin, and wp-includes.

Once you have renamed the .htaccess file, try loading your site to see if this solved the problem. If it did, then give yourself a pat on the back because you fixed the internal server error. Before you move on with other things, make sure that you go to Settings » Permalinks and click the save button. This will generate a new .htaccess file for you with proper rewrite rules to ensure that your post pages do not return a 404.

If checking for the corrupt .htaccess file solution did not work for you, then you need to continue reading this article.

Increasing the PHP Memory Limit

Sometimes this error can happen if you are exhausting your PHP memory limit. Use our tutorial on how to increase PHP memory limit in WordPress to fix that.

If you are seeing the internal server error only when you try to login to your WordPress admin or uploading an image in your wp-admin, then you should increase the memory limit by following these steps:

  1. Create a blank text file called php.ini
  2. Paste this code in there: memory=64MB
  3. Save the file
  4. Upload it into your /wp-admin/ folder using FTP

Several users have said that doing the above fixed the admin side problem for them.

If increasing the memory limit fix the problem for you, then you have fixed the problem temporarily. The reason why we say this is because there has to be something that is exhausting your memory limit. This could be a poorly coded plugin or even a theme function. We strongly recommend that you ask yourWordPress web hosting company to look into the server logs to help you find the exact diagnostics.

If increasing the PHP memory limit did not fix the issue for you, then you are in for some hard-core trouble shooting.

Deactivate all Plugins

If none of the above solutions worked for you, then this error is most likely being caused by a specific plugin. It is also possible that it is a combination of plugins that are not playing nice with each other. Sadly, there is no easy way to find this out. You have to deactivate all WordPress plugins at once.

Follow the following tutorial on how to deactivate all WordPress plugins without WP-Admin.

If disabling all plugins fixed the error, then you know it is one of the plugins that is causing the error. Simply go through and reactivate one plugin at a time until you find the one that caused the issue. Get rid of that plugin, and report the error to the plugin author.

Re-uploading Core Files

If the plugin option didn’t fix the internal server error, then it is worth re-uploading the wp-admin and wp-includes folder from a fresh WordPress install. This will NOT remove any of your information, but it may solve the problem in case any file was corrupted.

Ask your Hosting Provider

If nothing works, then you need to get in touch with your hosting provider. By looking at the server logs, they should be able to get to the bottom of things.

These are all the possible solutions that may fix the internal server error problem in WordPress. Did any of the above solutions fixed the problem for you? If so, then please let us know in the comments. Did you encounter the internal server error issue in the past? how did you fix it? If you know of a fix that is not listed in the article above, then please contribute in the comments below. We will make sure to keep the article up to date with any new advice from the users.

 

from : http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress  templates

Add an Expiration Date to WordPress Sticky Posts

WordPress’ sticky posts feature was introduced six years ago in the 2.7release. It was added to enable users to stick important posts to the front page so that they won’t disappear in a blog’s steady stream of chronologically ordered content.

By default, a sticky post is sticky indefinitely and requires you to manually uncheck the box under the post’s visibility settings in order to remove its stickiness. Expire Sticky Posts is a new ultra-simple plugin that allows you to set an expiration date on your sticky selections.

expire-sticky-postsThe plugin, created by Andy von Dohren, is a fork of the Simple Post Expiration plugin by Pippin Williamson. Expire Sticky Posts adds a date entry box to the publish panel for setting an expiration date if the post has been checked as sticky.

The plugin is perfect for automating the management of seasonal sticky posts and important time-sensitive notices. Also, some themes rely on sticky posts for setting the featured content on the homepage, requiring you to manually change them out. This plugin allows you to set up future dates for expiring sticky posts at the time that you publish them, so you don’t have to log in and change it later.

I tested the plugin and found that it works as advertised. The only thing I would add is the ability to set a specific time in addition to the date, as this may be important in some instances. If you find the Expire Sticky Postsplugin to be useful and have any further feedback, feel free to leave a note in the issues queue of the project’s GitHub repository.

 

from :http://code.tutsplus.com/tutorials/creating-child-themes-for-your-wordpress-theme-framework–cms-21933

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress  templates

What would it Take for WordPress to Lose Dominance?

635573096031001468-USP-NCAA-Basketball-Pittsburgh-at-Duke
this is caption

 

WordPress 4.1 Release Candidate is now available for download which includes the new default theme Twenty Fifteen, you can read about what else is new with it here. Or download it here. I love this new default theme, a huge step back in the right direction ( I thought Twenty Fourteen was awful ). A nice clean design, optimised nicely for mobile devices and good typography – this is how it should be done.

There was an interesting discussion on the WPTavern comments of this post, where Jeff asks what it would take for WordPress to lose it’s dominance. I found point 5 rather funny “A huge scandal takes place involving Automattic, the WordPress Foundation and those close to the project.” I just cant see WordPress being taken over for many years to come – it’s too far ahead at this point, sort of like the Facebook of CMS’s. Too many large companies rely on it to see it fail and I just don’t see anything at the momement that could even come close. I did a post recently about this, WordPress competitors, but none came close to what we have with WordPress. I think we’re all safe for a bit!

from :http://code.tutsplus.com/tutorials/creating-child-themes-for-your-wordpress-theme-framework–cms-21933

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress  templates