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

learn more… | top users | synonyms

3
votes
1answer
247 views

Authoritative answer on which boots first - Plugins or Themes?

I can't seem to find anywhere in the WordPress documentation an authoritative answer on the question on whether a WordPress plugin boots first or whether a WordPress theme boots first. I need to know ...
0
votes
2answers
24 views

How to use Internationalized human_time_diff() function in Chinese?

Looking at https://codex.wordpress.org/Function_Reference/human_time_diff I'm using an English version of Wordpress. In my theme template, I would like to define custom text of min, hour, day, week, ...
1
vote
1answer
24 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 ...
0
votes
0answers
24 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 ...
9
votes
1answer
363 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 ...
0
votes
0answers
43 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 ); ...
-1
votes
1answer
35 views

Misleading information in the Codex, how do they get away with it? [closed]

I'm new to WordPress Development but I've programmed in PHP for a couple of years. My understanding is that the Codex pages are as close to authoritative information on WordPress that you're going to ...
0
votes
1answer
108 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
0answers
20 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
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
0answers
228 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
28 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
87 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 ...
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?
0
votes
1answer
49 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 ...
1
vote
1answer
66 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'...
0
votes
1answer
59 views

Cleanup orphaned wp_terms and wp_term_taxonomy

As a non-tech guy and not familiar with Wordpress Codex, would appreciate any guidance on providing the codex for: cleaning of orphaned wp_terms cleaning of orphaned wp_terms_taxonomy cleaning of ...
6
votes
1answer
222 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/...
0
votes
1answer
15 views

Rewriting to a different page based on existence of query string?

I have a home page (id = 4) and a form page (id = 5). I want to send them back to the home page if they don't have a query string. But if they do have the query string we are looking for, then I want ...
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($...
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 ...
0
votes
0answers
38 views

Does a codex exist for creating meta boxes in taxonomy

I am looking for WordPress official documentation to create meta boxes in a taxonomy. There are many tutorials, but each of them is completely different. I don't want to use any plugins. I need the ...
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 ...
0
votes
1answer
40 views

Questions on WordPress Codex Concept

When I was reading the WordPress Codex about outputting the Post and Pages I saw these two Titles at Here Output a list of all registered post types and Output a list of all public custom ...
0
votes
1answer
297 views

wp_get_attachment_image_src always returns false

I'm using wp_get_attachment_image_src to retrieve image URL. Codex is simple for this function and starting from an ID on my database I used wp_get_attachment_image_src in this way: $image_url = ...
2
votes
1answer
953 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"...
0
votes
1answer
215 views

How to change templates based on URL

Okay, so here's what I'm trying to do but having a hell of a time figuring out. I've got a website that uses the MemberPress plugin. All of those pages by default use the standard default template ...
0
votes
2answers
207 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
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
91 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
557 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 ...
1
vote
1answer
184 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 ...
0
votes
1answer
259 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
1answer
71 views

Where to find new class reference or function of deprecated one?

After upgrading from WordPress 3.5.2 to 3.6.1, with define('WP_DEBUG', true); a site of mine's showing warning for some deprecated codes throughout the site. Some of 'em are generated from my codes, ...
0
votes
1answer
92 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
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. ...
1
vote
1answer
798 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
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 ...
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? ...
0
votes
5answers
2k views

Add Option if Not Exists

I need to see if an option, and if does, get the value. If not, I need to add it. The Codex provides: <?php $option_name = 'myhack_extraction_length' ; $new_value = '255' ; if ( get_option( $...
19
votes
4answers
13k 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 ...
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
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." ...
12
votes
2answers
765 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 ...
0
votes
1answer
359 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
641 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/...
5
votes
5answers
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 ...
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 ...
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')) ...