wordpress-theming

Wordpress - Nested list of categories & subcategories

て烟熏妆下的殇ゞ 提交于 2019-12-21 21:57:18
问题 Im trying to display a list of my wordpress categories with nested subcategories. So far i've only been able to get a list of parent categories or a list of subcategories excluding parents but I haven't been able to join the two together. This is the sort of result I am looking to create: Parent Category Subcategory Subcategory Parent Category Subcategory Parent Category Subcategory Subcategory Subcategory EDIT: The idea for this is to create a custom category page. The HTML is as follows:

Is it possible to host wordpress database from other server

烈酒焚心 提交于 2019-12-21 20:18:31
问题 I've a problem is that I've to host wordpress database from other server and directory from another server where my domain links, so is it possible to connect wordpress directory from other database which is not on same server, kindly resolve my issue if know the answer. Thanks in advance. 回答1: Yes, as long as the MySQL server allows the database to be accessed by external servers. When you set up WP, instead of "localhost", you'll put in the SQL server. you can export the current database,

Change WordPress's login label, “Username”

笑着哭i 提交于 2019-12-21 20:15:11
问题 On the default WordPress login page, how do you change the label, "Username", to something else? 回答1: I think this is a better alternative to the previous answer. function login_function() { add_filter( 'gettext', 'username_change', 20, 3 ); function username_change( $translated_text, $text, $domain ) { if ($text === 'Username') { $translated_text = 'customLoginName'; } return $translated_text; } } add_action( 'login_head', 'login_function' ); 回答2: Simple Solution add_filter( 'gettext',

Can Wordpress posts be rendered dynamically?

给你一囗甜甜゛ 提交于 2019-12-21 17:14:04
问题 I want to make a blog page which is generating content for particular user based on his/her Facebook likes, activity etc. For example I like Shakira and Coca Cola on Facebook. When entering the blog and connecting via Facebook, the blog gets that info and searches for Shakira's YouTube video through YouTube API and shows me the video in a WordPress post. After the blog searches for news connected with Coca Cola and shows news about it also in a post. There is no problem with FB connect,

Wordpress - Custom taxonomy page of custom post type listing by terms

允我心安 提交于 2019-12-21 09:26:10
问题 I have a taxonomy-taxonomy.php page that needs to look like so: CUSTOM POST TYPE TITLE (RESOURCES) Custom Taxonomy 1 (Resource Types) Resource Type Term 1 (White Papers) White Paper post 1 White Paper post 2 White Paper post 3 Resource Type Term 2 (Videos) Videos post 1 Videos post 2 Videos post 3 Tried to make sense of all the new documentation for Wordpress 3.0, but it only made me more confused as it seems to be mixed up with 2.8. 回答1: It's not necessary to transform the object to an array

What are the different ways to detect home page in wordpress?

你离开我真会死。 提交于 2019-12-20 13:58:24
问题 What are the different ways to detect wordpress homepage except is_front_page() and is_home() Thanks 回答1: is_front_page() is what you want. I assume, by the fact that is_home() is not working, that your home page is static, according to the settings in wp-admin. is_home() returns true on your main blog page whereas is_front_page() returns true on which ever page is defined as your front page, feed or not. From codex: This Conditional Tag checks if the main page is a posts or a Page. This is a

WordPress child theme override a parent theme include

旧巷老猫 提交于 2019-12-20 06:12:40
问题 I'm creating a WordPress child theme and need to overwrite certain widget templates. I'm trying to use this method to override the parent theme call: The Right Way to Override Theme Functions. However, I currently get this error: Fatal error: Cannot redeclare hickory_homepage_load_widget() (previously declared in C:\wamp\www\greenpeaceNewBlog\wp-content\themes\gp-blog\inc\widgets\homepage_widget.php:8) in C:\wamp\www\greenpeaceNewBlog\wp-content\themes\hickory\inc\widgets\homepage_widget.php

Wordpress redirect issue, headers already sent

江枫思渺然 提交于 2019-12-20 05:14:28
问题 I am wondering, based on the code bellow, where I would want to put my wp_redirect function because where it currently is does nothing but spazzes out and sais: Warning: Cannot modify header information - headers already sent by (output started at /***/***/WordPress/WordPressDev/wp-includes/script-loader.php:664) in /***/***/WordPress/WordPressDev/wp-includes/pluggable.php on line 881 Which I get because the page has already loaded. but I am un sure where to call this function. I have replace

How to create pagination in page code in wordpress?

久未见 提交于 2019-12-20 04:55:45
问题 Hi all I am a new of wordpress I want to create pagination in page but still can not . I try to download plugin or add code and serch in google in youtube but I still can not do it who can help me please ? this is my page code: <?php $zerif_total_posts = get_option('posts_per_page'); /* number of latest posts to show */ if( !empty($zerif_total_posts) && ($zerif_total_posts > 0) ): echo '<section class="latest-news" id="latestnews">'; echo '<div class="container">'; /* SECTION HEADER */ echo '

How to create a search form for custom fields in Wordpress?

▼魔方 西西 提交于 2019-12-20 04:23:40
问题 Here's the code for my search form: <form role="form"> <div class="form-group"> <select class="form-control custform"> <option>Make (Any)</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> </div> <div class="form-group"> <select class="form-control custform"> <option>Model (Any)</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> </div> <div class="form-group"> <select class="form-control custform"> <option