Online manual for WordPress and a repository for WordPress information and documentation.

learn more… | top users | synonyms

16
votes
4answers
12k views

Is there a flowchart for wordpress loading sequence?

So like wp must load series of files from, index.php -> ... -> wp-header.php -> ... ->functions.php ...and so on upon execution. Also there must be a similar flowchart for functions ...
12
votes
1answer
3k views

Alternative to query_posts for main loop? [duplicate]

Possible Duplicate: When to use WP_query(), query_posts() and pre_get_posts I just noticed today that the documentation for query_posts() mentions some "disadvantages" of using query_posts for ...
12
votes
1answer
17k views

numberposts? showposts? posts_per_page?

So the documentation on the Codex is pretty clear that showposts is deprecated. But that same documentation mentions nothing of numberposts. Instead, posts_per_page is listed. But if we turn to the ...
12
votes
2answers
741 views

Is There a Plugin Life Cycle Documentation?

Is there some documentation somewhere that explains what is the life cycle of the plugins? I'm starting a new plugin with OOP style, and I just found out that my main class is being instanciated a ...
8
votes
1answer
349 views

Is the codex no longer actively maintained?

I generally Google when I need a quick reference for a Wordpress function, and generally it's a Codex post that comes up first (eg. https://codex.wordpress.org/Function_Reference/get_term when ...
6
votes
2answers
6k views

Upload Multiple Files With media_handle_upload

I have a WordPress form plugin and I use media_handle_upload to upload the files and get there ids directly and attached its ids to the post as a meta date, I used the following to did that: The HTML ...
6
votes
1answer
221 views

Why is the use of @uses tag in docblocks discouraged?

See inline documentation standards Note: This tag has been used in the past, but should no longer be used. What gives? I am building a plugin to build a codex from the source of a plugin/...
6
votes
1answer
11k views

Issues enqueueing parent & child theme stylesheets with revised Codex method

This post brings up a few questions I've encountered pertaining to the recent changes around stylesheet enqueueing methods brought up in this thread and this thread. The issues I encountered came up ...
4
votes
4answers
2k views

Different number of posts in each category

I have categories driven site. I have different template for each category. I would like to set different number of posts – different for each category. Plus I would like to add proper previous and ...
2
votes
1answer
899 views

Whats the difference between blog_info('stylesheet_url') difference get_stylesheet_uri()

The question is in the title really. What is the difference between blog_info('stylesheet_url') difference get_stylesheet_uri(), and if it's a case that one is newer then which. The codex says: '...
2
votes
2answers
3k views

get_current_site() not returning site name

The function get_current_site() that's in my themes' footer.php file doesn't return the 'site name' property as specified in the docs (and expected in the theme). The purpose of the function is to ...
2
votes
1answer
146 views

Why does WP recommend against custom favicon functionality in themes?

I am developing a WordPress theme, and when reading the Codex article on Theme review, WP recommendeds against allowing custom favicons in a theme. Does anyone know the reason for this recommendation? ...
2
votes
1answer
899 views

Override Constants in Child theme

I have a parent theme that declare these constant in function.php: define("THEME_DIR", get_template_directory()); define("THEME_DIR_URI", get_template_directory_uri()); define("THEME_NAME", "BARNELLI"...
2
votes
1answer
200 views

Browser title script ignoring is_page /else conditional [closed]

I've used this code to stipulate different separators for different pages in my clients site: <title> <?php if(is_page('Portfolio')){ wp_title( 'of', true, 'right' ); echo ...
1
vote
3answers
3k views

Calling a plugin in theme development

I am trying to call plugins on a theme page. Specifically I am after the 'User Avatar' theme but their will be other later. How do I call a plugin on a theme? Presumable something linke <?php ......
1
vote
2answers
613 views

Does codex.wordpress.org use a plugin of some sort? If so what plugin?

I'm attempting to set up a wiki within a Wordpress install and love the way codex.wordpress.org is set up. Are they using a specific plugin to accomplish that or just well structured pages? Is there ...
1
vote
1answer
49 views

Where is the changelog for 3.5? where is the list of added removed files?

This: http://codex.wordpress.org/Changelog/3.5 is not a changelog. This: http://codex.wordpress.org/Version_3.5 gives a few changes, etc, but no list of files added and removed. Where might I find a ...
1
vote
1answer
389 views

Is the '/category/post-name-date/' permalink structure okay?

Wordpress Codex says: Make sure to end your structure with either %post_id% or %postname% (e.g. /%year%/%monthnum%/%day%/%postname%/) so that each permalink points to an individual post. But I ...
1
vote
1answer
2k views

Which action to hook wp_enqueue_script to? wp_head or wp_enqueue_scripts? [duplicate]

Possible Duplicate: Where is the right place to register/enqueue scripts & styles According to wp_enqueue_script() documentation in Codex, it seems that one should hook wp_enqueue_script() ...
1
vote
1answer
151 views

Help with Wordpress Query

I'm sort of a noob when it comes to Wordpess; I've only recently started building themes and I've run into a wall. I'm trying to feature 3 different articles at the top of my site using wpquery and ...
1
vote
1answer
20 views

Wordpress is adding margins and padding to my custom menu?

I've installed wordpress on my computer so I can learn how to make custom themes and test them locally. Currently I'm playing around with some pre-made code from a tutorial so I can get more familiar ...
1
vote
1answer
61 views

How to add a zero before numbers in WordPress Post Pagination?

I want my POST pagination to show the numbers from 1 to 9 like this: 01 02 03 04 05 06 07 08 09 10 11... and NOT like > 1, 2, 3, 4... Actualy i have this code: <?php wp_link_pages( array( 'before'...
1
vote
1answer
182 views

$reverse_top_level works the opposite way according to Codex?

The Codex for wp_list_comments states $reverse_top_level (boolean) (optional) Setting this to true will display the most recent comment first then going back in order. For my it is actually the ...
1
vote
1answer
780 views

How can i list current author's categories?

My Code getting authors written post categories but just 2 ID has author lists category.. I replace $current_user->ID but it is not worked. <?php $categories = $wpdb->get_results(" ...
1
vote
0answers
73 views

WordPress Codex or equivlent for Kindle use?

Is there a mobi/pdf/epub version of the Codex (or an up-to-date equivlent resource) so I can use it with an e-reader?
1
vote
0answers
51 views

Set $options reference

I am starting up in theme development and i have searched on codex on the topic of setting theme options.This is is what i am talking about, $options = array ( array( "name" => $themename." ...
0
votes
3answers
111 views

Codex Version Focus on Production or Nightly?

The function get_users_of_blog() is to be deprecated in WP 3.1.0 but the current production release is 3.0.5. Does it make since to have the documentation reflect a nightly change when the ...
0
votes
3answers
955 views

Breadcrumbs - get the author?

I have my own function called breadcrumbs(). In it I call is_author() to determine whether I am on an author page. If true I would like to know which author's page I am on. I tried the_author(), but ...
0
votes
2answers
76 views

What is the significance of _e(“Some String”, 'String')?

I have seen this in lots of wordpress themes and using it for a while but don't know what is the significance of it. It seems it does the same work as echo something out. Look for it in codex but ...
0
votes
1answer
86 views

Changing next and previous post link text

So I've been staring at the CodeX for about 10 minutes and can still not figure how to do this next and previous on a the post page. So I've added <?php next_post_link(); ?> and <?php ...
0
votes
2answers
27 views

get_month_link uses what wordpress template?

I tried using archive.php and category.php but always index.php is used of my template. How can I customize what template file is used?
0
votes
1answer
3k views

Programatically added attribute, set to 'show on product page' automatically. Woocommerce [closed]

Ive written a script to import products to a new install of Woocommerce. The products have attributes set up in the admin. This bit of code adds the attributes on import. update_post_meta($...
0
votes
2answers
205 views

post_class not working with css

through the codex I read about how to use the post_class() function to create a css hook for styling the content. Here is the code I have, PHP: <li class="<?php post_class();?>"> <?...
0
votes
1answer
90 views

Do I need to include a textdomain if my theme doesn't support translation?

According to the codex Themes are required to use theme-slug (or a reasonable facsimile) as textdomain for translation Does this mean that my theme needs to include a textdomain even if my ...
0
votes
1answer
639 views

What are these undocumented arguments for register_taxonomy?

The Wordpress codex has an example of the register_taxonomy() function at http://codex.wordpress.org/Taxonomies that shows arguments that are not documented in http://codex.wordpress.org/...
0
votes
1answer
40 views

using add_action without having custom plugin or theme

I need to send an email after an author publishes or updates a post. But I don't like developing custom plugin or theme. Is there any plugin that runs a php script after publish. Or where can I insert ...
0
votes
1answer
89 views

Block wordpress style for my plugin admin page

I have my own style for my plugin, it works, but wordpress adds a style too, and the page is not looking very ok. Is there any way to block wordpress style for my plugin administration page?
0
votes
1answer
539 views

get current page number with wp_link_pages()

I would like to get only the current page number (without HTML). I'm using wp_link_pages( array ( 'pagelink' => '%' ) ); How can I do that? I'm also using this code in my theme: function ...
0
votes
1answer
258 views

How can I do customizations on login, registration and password recovery forms?

There are a couple of answers here basically just linking to a plugin - to be fair there are some more specific ones too. I know there are many possibilities to use different hooks for the ...
0
votes
2answers
10k views

How to copy an existing (custom themed) site to a new domain

I'm trying to find a way of duplicating an existing Wordpress site that uses a custom theme to a new domain. Once it's there I'll do a redesign of the site and redirect the old url to the new one. ...
0
votes
1answer
357 views

Enqueueing Scripts/Styles mid-page

Since WP 3.3, the codex has been updated for both wp_enqueue_script and wp_enqueue_style that you can now enqueue both mid-page (within the HTML body). I see this as an advantage because: It's ...
0
votes
1answer
84 views

WP Codex answer incomplete? Put WP in subdirectory. .htaccess change required

I have installed Wordpress in a subdirectory '/medical' and want the address to show up as www.mysite.com/page not www.mysite.com/medical/page The Wordpress Codex here : https://codex.wordpress....
0
votes
1answer
131 views

use custom field value as post category in loop

I have a page template and at the bottom, I want a loop of posts based on a custom field value - store_name This is what I have: <?php global $wp_query; $paged = (get_query_var('paged')) ...
0
votes
0answers
23 views

Why a WP_Query instance using 'tag' doesn't work?

everybody. I'm developing a small plugin and I need to fetch some posts with a very simple query: $args = array( 'tag' => $tag ); $fc_query = new WP_Query( $args ); The point here is ...
0
votes
0answers
36 views

How to display a post from other network site in WordPress MU network

In a WordPress multisite I would like to display some posts from blog 2 in blog 1 So in Blog 1 I would do $blog_id = 2; switch_to_blog($blog_id); echo get_permalink($post_id, true ); ...
0
votes
0answers
19 views

Pagination redirection in WordPress

I had a blog website in a custom CMS. I recently re-developed the website in WordPress. The old website had pagination urls like "?page=2" But WordPress shows pagination urls like "/page/2" Now what ...
0
votes
0answers
212 views

How to call function in functions.php in external file inside same theme?

I'm trying to develop a theme by my self. In my theme, I have a function inside functions.php and a php file named ajax.php. I was trying to call a function inside functions.php in ajax.php, but it ...
0
votes
0answers
25 views

wp_schedule_event need to deactivate plugin changing recurrance

I currently developing a plug that has wp_schedule_event , the purpose of wp_schedule_event to my plugin is i want my plugin so send an email depends on recurrance of the wp_schedule_event. I also ...
0
votes
1answer
81 views

Wordpress from url get external source title

Hi I am building a news website. I am trying to automate it. News url (metabox) Title Content area Image (featured image option on wordpress) When paste the site url I would like the other ...
0
votes
1answer
47 views

Can't put a hyperlink on Featured Post's Image

For the life of me I can't get a clean answer to my issue. The codex says to use get thumbnail but whenever I exchange the current code for the get thumbnail everything just stops working. I'm fairly ...