How to be a Rockstar WordPress Designer 2 by Rohan Mehta

By Rohan Mehta

Show description

Read or Download How to be a Rockstar WordPress Designer 2 PDF

Best web-design books

HTML Professional Projects

No different ebook on HTML bargains a project-based method for higher-end clients. This project-oriented technique supplies hands-on routines so that you can practice within the actual global. "HTML expert tasks" specializes in constructing 4 kinds of websites: company intranet, e-commerce, non-profit/ government-related, and public relatives.

Beginning CS5 Cascading Style Sheets for Web Design

Cascading variety sheets (CSS) are the trendy general for site presentation. while mixed with a structural markup language similar to HTML, XHTML, or XML (though no longer constrained to these), cascading kind sheets offer net browsers with the data that permits them to provide all of the visible features of an online record.

Additional info for How to be a Rockstar WordPress Designer 2

Example text

The function is used like this: $exclude = rockable_build_cat_exclude(); query_posts('cat=' . $exclude); Now, we need to write some code that actually generates HTML from this array of options. Generating the Pages Options pages rely on a few basic functions to be created. First, we add actions. Adding actions tells WordPress we’re going to be doing some stuff here. We need to add actions for generating the menu, as well as for any scripts or styles we want to add. Here’s the code: 34 Theme Options Pages add_action('admin_init', 'initialize_function'); add_action('admin_menu', 'admin_generating_function'); Then, we need to write the initialize and admin generating functions.

Php in the functions directory. > This file is responsible for including every options page we need to make. php and add in this code: if (is_admin()) : require_once (ROCKABLE_FUNCTIONS . php'); require_once (ROCKABLE_FUNCTIONS . php'); require_once (ROCKABLE_FUNCTIONS . php'); endif; 57 Theme Options Pages We include all the files we created here. Note that we only include the files if it is an admin page ( is_admin() ). Then we add an action for the scripts and styles. Paste in this line: add_action('admin_head', 'rockable_admin_head'); The hook admin_head refers to the creation of the of the page.

Empty($uploaded_image['error'])){ echo 'Error: ' . > Explanation: first, we need to add actions to tell WordPress we are handling the AJAX upload with the named function. Here’s what the code looks like: add_action('wp_ajax_AJAX_ACTION', 'function name'); You may notice that in the AJAX upload script, we add a data variable action: 'rockable_ajax_upload'. This is necessary. ALL AJAX requests to the ajaxurl MUST have an action variable posted. This action variable is written after wp_ajax_ in the ▶ 56 Theme Options Pages add_action statement.

Download PDF sample

Rated 4.22 of 5 – based on 31 votes