wordpress-theming

How enable .html in wordpress pagination

╄→гoц情女王★ 提交于 2019-12-13 03:59:34
问题 I have to use wordpress with .html extension, and i am using plugin to make .html extension at end of URL, that is working fine, but my pagination becoming failed, it makes URL as /page-url.html/page/2 that goes on Page not found, how can I enable .html in pagination ? Thanks in advance. By the way, i did some work like add_filter('get_pagenum_link', function($url) { $html = strrpos( $url, '.html' ); if( $html > 0 ){ $base_link = substr( $url, 0, strrpos( $url, '/page' ) ); $page_number =

Wordpress - What is the best way to disable/hide tag pages when there are less than 7 posts tagged

◇◆丶佛笑我妖孽 提交于 2019-12-13 03:41:52
问题 I am looking for a way to hide tag pages when there are less than a certain number of posts (7 in my case) tagged with a particular tag. 来源: https://stackoverflow.com/questions/56540983/wordpress-what-is-the-best-way-to-disable-hide-tag-pages-when-there-are-less-t

In WordPress how do you register built-in taxonomies with custom post types in code?

白昼怎懂夜的黑 提交于 2019-12-13 03:35:05
问题 The WordPress codex has a lot of examples of how to register custom taxonomies with custom post types, but I couldn't find much about using built-in taxonomies (tags & categories) with cpts. I have a cpt called listings, and I need to add the standard category and tag UI elements to the listing cpt page. I also need to do this with code in my functions.php, rather than using a plugin. 回答1: Not a problem at all. When you register the post type, just add this argument to the array: 'taxonomies'

Wordpress Toggle Collapse Speed (Avada Theme)

丶灬走出姿态 提交于 2019-12-13 02:58:00
问题 I don’t know why the toggle is collapsing and closing very quickly. It’s not staying open. This is weird because I've been using this widget to all my websites with Avada theme. Is there something that I need to setup or put on code? Can anyone help me? http://flexpacio.com/faq/ Jules 来源: https://stackoverflow.com/questions/58977590/wordpress-toggle-collapse-speed-avada-theme

WordPress: Access Database From Widget Code

我的梦境 提交于 2019-12-13 02:30:56
问题 How can I access to my WordPress database and run SQL from the widget code? (I need to access to the settings of one of my plugins from the widget code) 回答1: You can check this http://codex.wordpress.org/Class_Reference/wpdb for full documentation. In resume you can do something like the follow from any part of your widget code: global $wpdb; $rows = $wpdb->get_results( "SELECT id, name FROM table" ); 回答2: If you want to retrieve some information from the database, you can use one of four

disable cropping featured image in wordpress [closed]

安稳与你 提交于 2019-12-13 00:34:02
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I am using featured image as a post image but on uploading a image it crops while setting it as featured image, i dnt find any solution for it, Can any one help? Wordpress Admin panel screenshot: - This image is

How can I modify the filename suffixes of uploaded files in WordPress?

耗尽温柔 提交于 2019-12-13 00:30:04
问题 I was wondering if it is possible to modify the way WordPress handles image uploads. If I upload an image now, the default filenames for the various sizes include the dimensions, something like the following: image-100x100.jpg , image-300x300.jpg , image-600x600.jpg , and image.jpg . While this may be useful in some cases, I need these file names to be a bit more versatile, something like the following: image-thumb.jpg , image-medium.jpg , image-large.jpg , and image.jpg . Does anyone have

Trying to Create a Popular Posts Page on WordPress with PHP

前提是你 提交于 2019-12-13 00:24:31
问题 Many thanks for the information on: Wordpress popular posts without using plugins which greatly helped me put together my own Popular Posts Page Template for my WordPress site. However, I think I need to alter the code to make it behave better and am not sure what to do. The new page is at http://sassyginger.com/most-popular-posts. It shows two posts (when it's supposed to show five), and then associates them both with "zero views" which I know isn't right. I'm very new to PHP so would

Unable to Display Page Title Using wp_title() Function in WordPress

依然范特西╮ 提交于 2019-12-13 00:16:29
问题 Can you please let me know how I can use the wp_title() function to grab each page titles in WordPress. I used the following code to get the title in different page based on titles but it dost' work! Here is the code I am using <title> <?php if (is_front_page()) { bloginfo('name'); } elseif (is_page()) { wp_title(); echo ' - '; bloginfo('name'); } ?> </title> 回答1: Try this : <?php wp_title('|', true, 'right'); ?> Here is the function reference link : http://codex.wordpress.org/Plugin_API

Gravity Forms adding display none

自作多情 提交于 2019-12-12 11:09:52
问题 I'm creating a custom template inside my WordPress theme, since my template is a completely different layout than my active theme, the template has it's own header & footer and inside of both I have properly declared wp_head(); and wp_footer(); respectively. Inside my template code, I am trying to display a gravity form using do_shortcode, but no form shows. When I inspect the area, I can see the form code, but there is a style="display:none" added to the .gform_wrapper div. As one more note,