Modifications to theme and plugin files to create new functionality.

learn more… | top users | synonyms (10)

1
vote
1answer
1k views

Custom Post Type Pagination Doesn't Work in Wordpress 3.4

I have a problem when using Wordpress 3.4. My "Products" custom post type pagination doesn't work. Here is the code I use $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $loop = new ...
1
vote
2answers
4k views

wordpress custom walker for thumbnails with custom menu

I'm still very novice at PHP so any help is greatly appreciated. Typically I have found the codex to be very helpful but it appears custom walkers may be outside its scope. I'd like to have ...
0
votes
4answers
4k views

Prevent duplicate posts in wp_insert_post using custom fields

My source links are something linke this : http://sample.com/entertainment/default.aspx?tabid=2305&conid=102950 http://sample.com/entertainment/default.aspx?tabid=2418&conid=104330 ...
0
votes
1answer
137 views

How-to inspect filter-able $vars?

Note: This is more of a tutorial/wiki than a real question and should be a reference for later Questions. If you got something to add, please feel free to add an answer. Working answers get upvoted. ...
2
votes
4answers
3k views

Custom Walker: how to get ID in function start_lvl

I am making my first custom walker to build an accordion menu. To start with I used this example: http://bitacre.com/2025/custom-nav-menu-walker-for-wordpress-themes There are two functions. First ...
2
votes
3answers
1k views

How do I create a widget that only allows a single instance?

How do I create a widget that only allows a single instance of a widget to be added through the Wordpress interface? The default behaviour of widgets allows multiple instances to be added. I am ...
2
votes
3answers
1k views

How do I filter the excerpt metabox description in admin?

I want to change the default "Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts." help text below the Excerpt input area to ...
1
vote
3answers
89 views

Static posts page with home.php

For my website, I am using a static home page page Home (template front-page.php) and for posts- page News (template home.php) I need to show all the post titles and exceprts on that page News ...
1
vote
1answer
579 views

Wordpress custom search url

I'm trying to chang my custom search url for SEO purpose. I found an article about how to change mydomain.com/?s=query to mydomain.com/search/query. However, i prefer to have a custom search url such ...
0
votes
3answers
31 views

How to redirect the home page to a custom page?

I had a WordPress site which was moved to a directory called "test". Now, all the urls for the wordpress site is domain.com/test, /test/wp-admin. The main index page is a custom html page for ...
0
votes
3answers
540 views

Removing Image Sizes for Custom Post Type

I'm trying to go about this without the use of a plugin, but actions and filters Is there a way to remove extra image sizes generated by WordPress based on the Custom Post Type? I've been trying to ...
0
votes
1answer
866 views

How to create custom home page via plugin?

I want to code a plug-in that creates new custom home page. Note that I have never coded any plug-in before. 1) After activation of plug-in user needs to go to the options of the plug-in and set up ...
0
votes
2answers
2k views

Gravity Forms - Repeatable “File Upload” field using “gform_column_input_content” filter [closed]

I am looking to use the gform_column_input_content filter to make a repeatable file upload element. The filter modifies the HTML content of the list field column input tag. The following code ...
-1
votes
1answer
60 views

Highlighting Sub topic in a post?

Have seen this sub topics highlighter in many blogs. It gives a special attraction to a sub topics used in the post. Is this a plugin or part of code? How can I add this? http://imgur.com/UbGpz7j
1
vote
1answer
4k views

How to add checkbox and radio button in Profile Page

I liked to customize my profile page by adding new fields to get more info from the user like "Gender" or "Speaking Languages". I managed to get the text input form to work, the problem I having now ...
1
vote
2answers
1k views

Custom Post Type with Custom Title

I have a custom post type without title support and I'm trying to generate one from post's taxonomies and custom fields. To do so, I'm using this code: function custom_post_type_title_filter( $data , ...
0
votes
3answers
1k views

Removing Unnecessary Text from Admin Menu without CSS

I am looking for a way to remove all the unessesary text from default worpdress metaboxes. Preferably I would like to ensure that the content is not just hidden through CSS but actually removed from ...
4
votes
3answers
3k views

Adding extra authentication field in login page

I am going to enhance my WordPress authentication page. My idea is that simply adding an extra field into the login page. The extra field will require user to enter personal identification code (4 to ...
2
votes
1answer
2k views

How to Remove Certain Screen Options and Table Columns from post type in wp_list_table?

On the page where we list all posts made: example.domain.com/wp-admin/edit.php There is a Screen Options tab in the upper right corner. Upon clicking this, a menu slides down. Contained within this ...
0
votes
1answer
2k views

Interesting Custom Post Type Slug with Taxonomy and Custom Field

I have created a custom post type called "events" and have also created a custom taxonomy which only shows up on this specific post type through which the admin must select an "event category" ...
8
votes
2answers
961 views

How to add plugin to WordPress Repository?

I just made my first plugin and it got approved by WordPress. Great news for me, but now what? The "instructions" on the Codex are anything but clear for me. I did find an article on Dig WP and I ...
5
votes
5answers
2k 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 ...
4
votes
2answers
4k views

Add multiple custom fields to the general settings page

What I would like to do is to add a few custom fields to the general settings. This is the code that Im using. It works allright but I just cant figure how to add more fields. I would like to create ...
3
votes
2answers
1k views

How to force one column layout on custom post type edit page?

I've created a plugin using custom post types and I need to force the default two column post page to a single column. At the same time, the Publish metabox must move to the bottom. I need to do this ...
2
votes
3answers
753 views

Custom comment type maybe?

(First of all, sorry for bad english) If there are people here using wordpress as cms, you probably realize that you dont need comment system that much. Esspecially custom post types like products ...
1
vote
1answer
494 views

Show newly added posts since last user login time /date

I'm looking for a solution to create a custom loop which will only display the last added/ modified posts since the last user login to the site. It shouldn't be that complicated doesnt it ?
1
vote
2answers
1k views

How to customize default wordpress editor?

Good to hear that Sonny (wordpress3.3) has the new editor API wp_editor() that gives us the ability to use multiple instances of the editor in our custom fields with ease. But I needed to customize ...
1
vote
1answer
897 views

Creating a custom Admin panel

I'm building a Wordpress Plugin and it has two tables and some data. Right now, for displaying and changing the data, I'm using the wpdb function and manually creating the user interface (mimicking ...
10
votes
2answers
925 views

Specific upload folder for PDFs in custom Post type in WP multisite

I need to filter uploads to a specific folder for a custom-post type called "document" only for PDFs. So far, I have: function custom_upload_directory( $args ) { $base_directory = ...
5
votes
1answer
2k views

Styling Shortcodes in Visual Editor

Does anyone know how to style the visual editor so that when specific shortcodes are used they are replaced with an image within the visual editor? I have found that many users screw up the shortcode ...
4
votes
6answers
7k views

Custom order of terms for custom taxonomy in admin and website

I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). ...
4
votes
1answer
3k views

Search multiple custom fields by using meta_query

I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears ...
2
votes
2answers
1k views

Broken pagination

Well I'm here again with almost the same problem as I had in this post three weeks ago, but let me explain what has happened since then: I was originally using one loop to display the most recent ...
1
vote
1answer
509 views

Limit the Excerpt field in WP-Admin in words

Is it possible to limit the Excerpt field on the post page in words? Note that I am aware that it's possible to echo the excerpt and limit it in words, but I want the field itself to limit the amount ...
0
votes
2answers
825 views

Post from front-end only by logged in users, form posts as “posted by: <logged-in user's username>”

I've handrolled a form for posting from the front-end, with some custom functions that I needed. However, I've made the form only accessible when a user is logged in, and I'd like to have the articles ...
5
votes
5answers
11k views

Proper Way to Modify Plugin

What is the best way to modify a plugin? I frequently want to make small changes to one or two functions within a large plugin. This is easily done, but I have to use comments to mark my changes and ...
3
votes
4answers
2k views

How can I create an alternative home page?

I'm working on a site which has a fully customized front page. Now I'm asked to add a more classic looking blog type page which will be reacheable at http://domain/blog. I tried creating a custom ...
2
votes
1answer
644 views

query_posts sort in multiple directions

I'm trying to improve my post sorting by using multiple criteria, but I want specific orders for different values. For example, I have a meta_key called 'featured' that I want to move any post up to ...
2
votes
2answers
2k views

Custom permalink structure only for default posts

Does anybody know how to modify the url struct only for the single post page? When I go to a post page, the url should look like: example.com/xxx/my-post. All other urls (with the exception of the ...
2
votes
1answer
1k views

media_handle_upload weird thing

I am using a front end script to upload images , all works fine but recently i noticed the uploaded images are not saved in proper directory. My settings are to Organize my uploads into month- and ...
1
vote
1answer
313 views

Customized title tag for each page in pagination?

With the reference of below questions. How to change title tags on paginated posts? Paginate tags page How to change title tags on paginated posts? Add Page number to Meta Description in Wordpress SEO ...
1
vote
1answer
391 views

Custom Field as Custom Taxonomy?

I have a custom taxonomy, "Country". I am using WP User Frontend to let users post to the site. Most data is saved as custom fields, so I have a custom field "cf_country". I want to be able to set ...
1
vote
1answer
877 views

simple expandable vertical menu, java script problem

I am trying to create a simple expandable menu in wordpress. Bellow you can see the javascript I am using (copy and mix from internet). <script type="text/javascript"> ...
1
vote
1answer
3k views

How to add a select menu to this metabox code?

I'm using a metabox script that works great for having absolute control over the design and placement of the metabox fields. There is one problem: I can't remember where I found the script and need to ...
1
vote
2answers
707 views

Anonymous Postings

This is a repost of a question asked on stackoverflow, and was referred to this site: My client wants to create a form on his new WP site that when filled out and submitted will be submitted to his ...
1
vote
2answers
445 views

How to let a single post have its own domain name

I am not sure which solution here would work best as a solution but what I am looking for is just a simple way to enter an optional domain through a metabox on the page edit screen and then just ...
1
vote
1answer
1k views

Custom sidebar category listing?

I am trying to make a custom Category Display on my side bar and for that I need some way to get both, the category list and the child list in 2 different arrays or something alike... First, I tried ...
0
votes
2answers
532 views

Pagination not working on Custom Page Template

I searched a lot on this but I can't figure out why my code is not working. I published a page with slug "blog" that uses a custom built template "page-blog.php" that I build from editing the ...
0
votes
1answer
1k views

Multiplile values checkbox or select in custom meta box

I have followed the great answer by Jan Fabry in this question . How to make multicheck for post/page meta box this works great. My question though would be , what if someone WANTS a serialized ...
0
votes
1answer
1k views

How to make custom comment fields required and message field not required

I have a comment form that has name, email, brief, detailed and rating fields. The name, email, brief and rating need to be required, but the latter two are custom fields and I can only make them ...