Questions tagged [customization]

Modifications to theme and plugin files to create new functionality.

Filter by
Sorted by
Tagged with
7
votes
2answers
203 views

Remove WordPress theme from a specific page

There is a site with WordPress installed and a theme selected. I have created an HTML page for the site, but it wasn't looking well with the theme. So, I want to put the page on the site without any ...
7
votes
1answer
2k views

Custom maintenance page

Is there a way to add a custom maintenance page from theme folder? I have the code for the activate maintenance mode but i can't get the styling.. function activate_maintenance_mode() { if ( !(...
7
votes
3answers
7k views

Wordpress hook before inserting post into database

I need to do check the inserted post for certain keywords and perform some functions depending on the keywords found. is there a wordpress hook that executes "just before the post is inserted into ...
7
votes
3answers
3k views

Limit widget to certain sidebar?

I have multiple "sidebars", but not all of them are the same size. Not all widgets fit in all sidebars (for example, I have a "footer sidebar" where the client can place custom widgets, but they are ...
7
votes
2answers
1k views

Looking for a Table of Contents (TOC) plugin for WordPress

I am looking for a simple TOC plugin for WordPress that would create a ToC similar to the one from MediaWiki (Wikipedia). Usually I need this only for big pages and the TOC needs to be generated based ...
7
votes
1answer
4k views

Getting a stack trace when an error occurs?

I was told to "get a stack trace" when an error occurs in my WordPress installation. How do I do this? This is meant to be an easy place to refer others to. Please list plugins, configuration ...
7
votes
1answer
517 views

Check for and enforce unique value in user-entered custom meta field in WP Admin

I am trying to figure out how, on a new or edit post screen, to allow the user to enter a custom meta-item, BUT force it to be unique. Ideally, the process would work like so: Contributor logs into ...
7
votes
1answer
864 views

Custom Post Types, slug, archive and SEO plugins

I made a custom post type called "friends". I am able to correctly list my friends using this urls: http://mysite/friends/friend1/ http://mysite/friends/friend2/ http://mysite/friends/friend3/ ...
6
votes
4answers
498 views

Cleaning up WordPress to improve performance?

Looking over the current WordPress codebase it's clear that functions are over-used. My count is over 8,100 functions/methods are defined inside the WordPress codebase. That is terrible, and a ...
6
votes
5answers
8k views

How can I add title attributes to next and previous post link functions?

For some reason a title attribute is not appended to next_post_link and prev_post_link calls in WordPress. How can I add one?
6
votes
8answers
6k views

WordPress Plugin Development In MVC Architecture, How?

I think, the wordpress plug-in architecture is not MVC. So I want to use/do the MVC architecture in WordPress plug-in development (like cakephp, codeIgniter ). How can I use them in plguin development....
6
votes
4answers
15k views

How to delete all records from or empty a custom database table?

I can't seem to find a simple reliable way to do this - perhaps?: // delete row ## global $wpdb; $delete = $wpdb->query( $wpdb->prepare( "DELETE * FROM `wp_table_name`" ) ); ...
6
votes
5answers
18k views

How do I remove unwanted pages like archive, search, etc.?

By default WordPress pushes out a whole array of pages I don’t want or need - archive, author, blog, monthly, recent posts, categories, comments, attachment, taxenomies, search, search results, and ...
6
votes
2answers
2k views

What are the ADVANTAGES of ORIGINAL wordpress template structure?

Precondition: coming from a Custom PHP applications(using symfony, zend and so on) world, for me it feels unnatural to have template separated in a way that is done in original wordpress theme. e.g ...
6
votes
6answers
648 views

Backup the Database and Restore from the Backup?

I am using WordPress 3 and would like to backup the database to my computer (a Mac). My webhost is using PHP safe mode, so that sometimes limits what plugins I can use. What is a good way to do a ...
6
votes
7answers
216 views

I'm looking for some good references (manuals)

I started a blog recently. Currently I'm using a free theme and some plugins that are working well enough for now. And, my overall goal is to produce content and not become a WordPress developer, etc. ...
6
votes
3answers
4k views

Change admin bar to default:off

While I quite like the admin bar I actually want it to be OFF by default instead of ON ( I don't want to disable it altogether because I want users to be able to turn it on if they want - but but I ...
6
votes
5answers
5k views

get_pages() not ordering as it should

I'm using get_pages() function to get all subpages from a page like this: $childrens = get_pages(array('child_of' => 7, 'sort_column' => 'post_date', ...
6
votes
2answers
2k views

Scaling a WP eCommerce site

Related to this question. Any recommendation on tools, plugins for optimizing a large eCommerce site on WP. Currently hitting 1000 items and 5000 more items coming. It seems the optimizations would ...
6
votes
3answers
748 views

Is it a good idea to edit an already existing plugin to add more functionality?

I need to add a relatively small bit of functionality to a Wordpress plugin and I have the option to either edit the plugin directly, or scrap the plugin completely and repurpose PHP code from another ...
6
votes
2answers
22k views

Custom Search Query

I'd like to set up a custom search page that does the following: User checks off several items in a form that he'd like to see returned in his search (essentially choosing from a list of tags). ...
6
votes
5answers
70k views

Include a external PHP file into a Wordpress Custom Template

Is it possible to include a external PHP file into a custom template? I'm trying to add a blog into my site. I already have the header, footer, and sidebar layout in my site. Can I use those in my ...
6
votes
4answers
36k views

Custom Post Types on Category Pages

I'm working with a custom post type that uses the normal WordPress categories. I am able to modify my category template to display my custom post types exactly how I want them. The problem is, once ...
6
votes
3answers
7k views

How to remove comment section from page only , not from posts pages?

How to remove comment section from page only , not from posts pages?
6
votes
2answers
6k views

Users with custom roles not showing in post author select box

I am using a function to create new user roles and delete some defaults. However, they are not showing up in the post author box! Only the admin shows up because they are selected as an admin. Any ...
6
votes
5answers
5k views

Add separator to admin submenu

I would like to add a separator to the admin submenu section, NOT in the top level section. I'm thinking of using javascript and styling to do the job, but I was wondering if there's a more ...
6
votes
2answers
5k views

Making $ globally accessible with jQuery.noConflict()

The Codex promotes this method of using $ inside a plugin/theme JavaScript file: jQuery(document).ready(function($) { // $() will work as an alias for jQuery() inside of this function }); But if ...
6
votes
1answer
1k views

How to Handle Distributed Development Workflow

I'm trying to come up with a workflow for two (right now) people. One of whom will be doing theme work and another who will be writing content. We are not co-located are will not be anytime soon. The ...
6
votes
2answers
2k views

Automatically enable custom theme, plugins and default content on installation?

I'm using wordpress for a large non-profit with many sites. I'd like to decrease the amount of installation steps for the people setting up their sites. Is it possible to make a WP install that ...
6
votes
1answer
856 views

Why doesn't WP_Image_Editor save images using the Filesystem API?

I was in the process checking some of my existing plugins for any unsafe filesystem accesses, when I ran across WP_Image_Editor's save function, which calls _save, which finally calls make_image (...
6
votes
4answers
7k views

When is get_template_part() preferable to simply using the template.php files?

In this post on wordpress.stackexchange.com I asked whether using get_template_part(), as demonstrated in the TwentyTen theme, is a recommended best practice. The general consensus I got was that it ...
6
votes
1answer
2k views

How Is Network Activate Different From Activate (by Implementation)?

How is plugin network activate different from normal activation by implementation? What is done/not done in network activation that is done/not done in activation?
6
votes
2answers
3k views

Modify existing plugin function using filter (without modifying the plugin directly)

I have the following function inside an existing plugin: public static function init() { add_filter( 'wcs_view_subscription_actions', __CLASS__ . '::add_edit_address_subscription_action', 10, 2 )...
6
votes
1answer
734 views

Running Gutenberg React in Development Mode

Is there a way to enable WordPress to run the non-minified version of React while developing Gutenberg blocks? I am receiving an error from React while learning to create Gutenberg blocks. react-dom....
6
votes
1answer
4k views

Post/Page Preview Template

Is there a way to have a custom template php file that is only used for previews instead of it using the single.php file? This way the user knows they are in preview mode?
6
votes
2answers
258 views

Creating Unique Post URLs for A/B Testing… Is this even possible?

I want to create a WordPress plugin that allows me to do A/B testing for WordPress standard posts, but I can't use the Shrimptest plugin because I need a spin: Since I'm ultimately testing ...
6
votes
2answers
2k views

Pitfalls when Distributing Plugins that Access SOAP Web Services?

I'm wondering what pitfalls (if any?) developers here have run into when distributing WordPress plugins via the WordPress plugin repository that embed a SOAP client for accessing SOAP web services for ...
6
votes
4answers
3k views

Creating “static” taxonomies to choose from, inside custom post type?

Alright, so i have a custom post type called Blurbs (translated, sort of). I want to add a static set of categories for the posts within Blurbs (i don't want the user to be able to create custom ...
6
votes
1answer
744 views

How to get current_cat in navbar, in single post

In a site I have using Wordpress 3.0, when I'm in a single post, the navbar showing the categories doesn't give the parent category the class of "current_cat" and therefore that category is not ...
6
votes
1answer
3k views

How to change “Draft” string for status of custom post type to “Unavailable”?

ANSWER MOD: just an important mod to the chosen answer: // check if you actually have drafts; also avoids extra '|' separator if (isset($views['draft'])) { // 'Drafts' should be added (and come ...
6
votes
3answers
833 views

Version Control: Entire site or just pieces?

I've been using git to track changes in the plugins and themes I've developed for different sites. Each plugin or theme has their own repository in whichever local install of WordPress I happen to be ...
6
votes
1answer
305 views

How do I transition multiple installations to a single Multisite installation?

I have a client who runs 8 different blogs, currently on 8 separate installations of WordPress. I'm trying to encourage them to move to a single MS installation instead to make it easier (mostly on ...
6
votes
2answers
2k views

Wordpress Permalink changes to question mark (?) in URL

My Permalink custom url is /%post_id%/%postname%/ and my website is in Persian language, for some posts the Permalink is change in URL from http://www.ahangbaz.com/1300/%d8%a7%d8%a8%db%8c-%d8%b7%d9%...
6
votes
4answers
8k views

Getting Post Comments for post ID using WP_Query() and a Custom Loop?

(Moderator's note: The original title was "Is there a way to get post comments by post ID on a custom loop using WP-Query()?") Hi! I'm running a custom loop using WP_Query, that only displays one ...
6
votes
4answers
325 views

Seamless integration between WordPress and BBpress

I have a WordPress site at domain.com and a BBPress install at domain.com/subfolder the wp site has a menu item that goes to the forums, and I'd like the header to be the same between the two, so that ...
6
votes
3answers
993 views

Wordpress 3 MU for a development/stage/production site

Just wondering if people have any thoughts around the best way to setup Wordpress 3 to use for development, staging and production. I currently have an install that I just use for dev, before moving ...
6
votes
1answer
6k views

Show the most popular post per week

The plugin Most Popular Posts doesn't support WPML and therefore I have tried creating my own. I have found this tutorial in creating your own code for showing the most popular posts on my site: How ...
6
votes
2answers
2k views

Remote upload file to server B

I'm aware this might be some of the hardest coding to do ever, but thought of giving it a try. Im basically trying to detect all (mp3) filetypes uploaded through the Wordpress media upload and send ...
6
votes
1answer
5k views

Add a class to links in the visual editor (how to get old dialog back)

New: Old: In short, i want a list of some classes inside the add link dialog. Because this was default there might be a easy way to get it back like this? Long: I like to have the ability to add ...
6
votes
1answer
193 views

How to integrate a PHP webmail script into the backend of WordPress?

How can you add Roundcube (or any other PHP webmail client script) to the WordPress backend? Can this be done so that the webmail client can be accessed only from inside wp-admin? It should not be ...