wordpress-theming

how to remove “Archive | ” from wordpress?

Deadly 提交于 2020-01-07 09:51:47
问题 how do you remove "Archive | " from wordpress category page and only show the category? is there a plugin or what code do i need to remove? Thank you in advance ;-) 回答1: What I imagine that you mean is that there is a header tag containing "Archive | " somewhere in your category page. If you want to get rid of this string, the first thing you should look for is whether or not this can be changed somewhere in a Theme Options Page (if applicable). If you don't have a Theme Options Page, look

Wordpress Categories and SubCategories

血红的双手。 提交于 2020-01-06 18:10:46
问题 I am doing some changes on my blog theme, and i need to list the subcategories when user is inside the parent category, example: main-category -- subcat1 -- subcat2 So i need to show the subcat1 and subcat2 only when the user is inside main-category. At this moment i have 2 divs, one for the main-categories (this is what i need users to see on all pages) and one div bellow the main-category div to show the subcategories. Is this possible? I am sorry for my English, let me know if this is too

Wordpress Categories and SubCategories

元气小坏坏 提交于 2020-01-06 18:10:30
问题 I am doing some changes on my blog theme, and i need to list the subcategories when user is inside the parent category, example: main-category -- subcat1 -- subcat2 So i need to show the subcat1 and subcat2 only when the user is inside main-category. At this moment i have 2 divs, one for the main-categories (this is what i need users to see on all pages) and one div bellow the main-category div to show the subcategories. Is this possible? I am sorry for my English, let me know if this is too

jQuery addClass foreach ul.sub-menu

孤街醉人 提交于 2020-01-06 15:12:44
问题 WordPress does't give ul.sub-menu any unique classes (yet)... Here is my HTML: <ul id="menu-primary" class="nav"> <li>News <ul class="sub-menu"> <li>Local</li> <li>Politics</li> </ul> </li> <li>Sports <ul class="sub-menu"> <li>Baseball</li> <li>Football</li> </ul> </li> <li>Opinion <ul class="sub-menu"> <li>Forums</li> <li>Blogs</li> </ul> </li> Using jQuery I can .addClass to the first one only. jQuery(document).ready(function($){ $('ul.sub-menu').addClass (function() { return "item-" + $

Save the output image into a different directory, with a new filename and extension [duplicate]

做~自己de王妃 提交于 2020-01-06 14:59:06
问题 This question already has answers here : creating an image in php, display works, saving to file does not (4 answers) Closed 4 years ago . Let say I have this code in my "image.php" file that will create a new GD image stream and output an image: header ('Content-Type: image/png'); $im = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); imagepng($im

Editing template content from the dashboard screen in Wordpress

不羁岁月 提交于 2020-01-06 09:07:57
问题 I would like to set up a way to be able to edit content in my template form the wordpress dashboard or new admin page. Something like creating input boxes on the dashboard, or on a new admin page, that would update specific content I have hard coded in my template. I'm using a one page site (long scrolling), and would like to allow people to edit the separate content areas from an admin page. (an existing plugin that does this would be fine too) Thanks! 来源: https://stackoverflow.com/questions

Editing template content from the dashboard screen in Wordpress

橙三吉。 提交于 2020-01-06 09:05:24
问题 I would like to set up a way to be able to edit content in my template form the wordpress dashboard or new admin page. Something like creating input boxes on the dashboard, or on a new admin page, that would update specific content I have hard coded in my template. I'm using a one page site (long scrolling), and would like to allow people to edit the separate content areas from an admin page. (an existing plugin that does this would be fine too) Thanks! 来源: https://stackoverflow.com/questions

Using WordPress, calling a function twice on same page fails second time

早过忘川 提交于 2020-01-06 08:46:08
问题 I have a function in my theme's function.php file that calls to the Edmunds API and retreives a stock vehicle image. From a page template, if I call the function more than once, it fails on the second call. It works perfectly the first time, but doesn't output anything the second time. When I try and print_r the $aVehImage array, it's empty. (I've verified that images are available in the API for the vehicles in the secondary calls, btw) Code below: function get_edmunds_image($vehicleMake,

Overwrite wordpress theme page by plugin

跟風遠走 提交于 2020-01-06 06:07:13
问题 I want to overwrite a theme page using my custom wordpress plugin , i tried to add filter but without result , i don't want to change directly on the theme because it's bad idea for every developer. this is my plugin code i added a filter to check pages public function __construct(){ add_filter('theme_file_path','customize_theme_pages', 99, 2 ); } and i tried to replace theme page with my custom page like that public function customize_theme_pages($path, $file = ''){ if( 'woocommerce/checkout

How to Enqueue the Bootstrap Script and Style for WordPress Page Template but not Whole Site

本秂侑毒 提交于 2020-01-06 05:29:47
问题 I am new to WordPress and am building a single page template for my site. I want to keep my main WordPress theme for the majority of the site, but I have a very specific application that I want to use Bootstrap for on just a couple of pages. To avoid losing my custom work when the theme updates, I made a child theme with the page template and then selected that template from WordPress for the appropriate page. I finally arrived at this script for my functions.php (based on example here): <