A type of hook that provides a way for content to be overridden programatically
0
votes
1answer
19 views
Combine two conditions in one statement syntax [closed]
I have two queries that I would like to combine because it becomes a lot of code and I think that's not necessary but I make a mistake with the syntax
I want to combine
} elseif (is_category( ...
0
votes
0answers
15 views
Adding Search Filter on Informational Website
Background: Say I am creating a website for a popular mobile brand. On this site I will have "informative" articles.
Every mobile will also have a short overview, followed by specs and images of the ...
0
votes
1answer
19 views
How can I apply a WP filter on specific plugin version
I have the plugins list in 'wp-admin/plugins.php' page. For each plugin there is some meta info extracted by WP from each plugin file:
/*
* Plugin Name: somename
* Version: 1.2.3
*/
I want to ...
0
votes
0answers
14 views
Disable Filter and Allow Embed/iFrame on Blogger Import
I'm trying to import blogger posts into a wordpress site but all embedded audio/video content is getting filtered out.
I've commented out the following in kses.php:
// Post filtering
...
0
votes
1answer
15 views
apply_filters to featured image
I have a page where I have embedded the page using these lines of codes at function.php:
//------Embed Content------
//Title
function CustomFunction_ShowPage_Title($id) {
$post = get_page($id);
...
0
votes
1answer
34 views
apply_filters('get_the_content', $content) + Except
I'm using the following function to load my content dynamically:
apply_filters('get_the_content', $content)
However, I would like to apply an excerpt to this method but the only way I know how to ...
0
votes
2answers
82 views
Custom Post Templates
The Issue: I am looking for custom single post templates, to add or remove individual elements as a function of a normal single post.
There are a lot of ways to create custom post templates for ...
0
votes
1answer
21 views
Correct method of redirecting user login
The popular membership plugin 's2Member' uses the wp_login action hook to wp_redirect a logged in user to where s2 deems appropriate. This causes a conflict with other plugins, in that other plugins ...
0
votes
1answer
37 views
an action hook when a post reaches a certain number of views
I am using WP Post Views plugin to display the post number of views. I use:
<?php if(function_exists('the_views')) { the_views(); } ?>
I am creating a badge system for my wordpress site. My ...
0
votes
1answer
37 views
dynamically filter by category via sub-menu
I'm trying to figure out if it's possible to dynamically filter my custom post types by category via a sub-menu I have set up.
So I've set up a custom post type: news and enables categories that I ...
0
votes
0answers
14 views
Turn wp_tag_cloud into a front-end filter
I have a photo gallery with wp_tag_cloud in the sidebar to display hierarchical taxonomies that categorize photos. The taxonomy name is person.
<div id="filter">
<?php wp_tag_cloud( array( ...
1
vote
1answer
21 views
Filter In Reply comments from Wordpress Admin Panel
Is there any way to filter the comments that are In Reply from the comments list? I basically just want to see the depth 1 comments on a separate filter.
@GhostToast Ive added this to create a new ...
0
votes
0answers
10 views
Scraping part of a website (bbc.co.uk/news) [migrated]
on the bbc.co.uk/news site, there is a most popular section (most read, etc), (i'm very new at wordpress development and am trying to learn). The issue I have is that when I use wp_remote_get ($url); ...
0
votes
1answer
18 views
Filter causing loss of _wp_attachment_metadata
A while back I asked this question:
Save camera info as metadata on image upload?
Long story short, it works in that the custom field is saved into wp_postmeta and I can access that value. But as I'm ...
0
votes
2answers
29 views
Override parent theme function that is not hooked or in the functions.php file
I need to remove a function from the parent theme and replace it within the child theme.
The function is called print_meta($meta_box). The function is not pluggable and it located in a random file, ...
2
votes
1answer
32 views
Why do filters/actions require an argument count?
I was just looking at plugin.php trying to answer the above question and I couldn't work it out. The actual code that calls filters is this:
do {
foreach( (array) current($wp_filter[$tag]) as ...
1
vote
1answer
20 views
Hide content editor for posts after approriate date
I am tuning my new site and i what to disable Content Editor for post created after date X, but for posts that created before that date Content Editor must be on its place.
0
votes
1answer
37 views
How do I safely force get_theme_mod() to use a defined get_option(“stylesheet”) value?
In our development process we have several branches of the same theme for each developer. Theme branches live in different directory names, so when doing get_theme_mod(), get_option("stylesheet") can ...
0
votes
2answers
43 views
how to remove filter from wordpress shortcode output
Twitter URL plugin add the filter to the_content. This filter messing up the output of my plugin shortcode output. So I wish to remove this filter only for my shortcode output.
...
1
vote
1answer
35 views
Set Item Order with wp_nav_menu_{$menu->slug}_items
I have some code that adds a menu item to a menu using wp_nav_menu_{$menu->slug}_items.
It's pretty easy to add a menu item as the first or last item of the menu, but I was wondering if there's ...
0
votes
2answers
40 views
Shortcode / plugin with custom (flexible) output
Following scenario: I'm building a theme framework which I want to reuse in various themes of mine. In this framework there is a collection of many shortcodes. For exemplary illustration of my ...
0
votes
0answers
25 views
Display recent commented post above new submitted post
I have a list of all posts that are commented on a particular day. If someone comments a post, I want it to put that one above the other posts, even if they are submitted on a more recent date...
How ...
0
votes
0answers
14 views
How do I change the title link generated code to improve accessibility?
When you fill up the title input link
WordPress will generate a code like this:
<a href="http://google.com" title="Testing it"></a>
However, this seems to be a bad practice ...
0
votes
0answers
64 views
Filter posts by multiple checkbox categories
I would like to set up a widget to filter my post by categories. Let's say, I do have two different categories, "Countries" and "length of stay" with sub categories. Here is an example of what I have:
...
0
votes
1answer
33 views
Custom built theme won't filter categories
I'm currently finishing up my first proper wordpress theme for my uni assignment. When I select a category in the sidebar the full list of posts from all categories are still shown. I've tried ...
2
votes
1answer
70 views
How to implement time filter to show random post 1 month for one category and 3 months for other categories
I started to work on one website after another developer and there is problem with his "popular widget" which is basically showing 3 random posts from category. There is some Switch statement which is ...
0
votes
1answer
20 views
Wordpress overwrites UNC
I am using wordpress multisite. When editing a post, adding a link to a file in UNC format, and clicking save, wordpress is stripping out the drive letter and colon before the data hits the database. ...
0
votes
1answer
77 views
filtering custom post types via meta data drop down
I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this ...
0
votes
0answers
18 views
restrict_manage_post to remove filters
Using restrict_manage_post, is it possible to remove default WP-List-Table filters? Example that I tried, but failed below:
add_action( 'restrict_manage_post', 'remove_cpt_filters', 99);
function ...
0
votes
0answers
51 views
Custom excerpt_more filter not working when <!--more--> tag is present
I'm doing this inside Thesis 2, in case that matters.
I am using the_excerpt(); on my blog page to get the posts. And I'm using two custom filters:
function custom_excerpt_length( $length ) {
...
0
votes
1answer
20 views
Adding an orderby filter, casting postmeta with multiple keys
I am using this filter to sort my query by a date field stored as text (legacy data)
add_filter( 'posts_orderby', 'my_posts_orderby_date', 10, 2 );
function my_posts_orderby_date( $orderby, $query ) ...
0
votes
0answers
20 views
Filter by Author on Category Pages
I'm looking for a solution to filter/sort posts by author on category pages/archive pages, ideally by means of a drop-down menu.
I've searched the Wordpress plugin repository but cannot find any ...
0
votes
0answers
44 views
How to filter a job search by city and state in a job board like Jobroller?
I'm working on a job board for a client using Jobroller. The client wants on the sidebar buttons representing states and when clicked on, display job listing based on that city. I read that Jobroller ...
3
votes
1answer
48 views
How to add a “publish” link to the quick actions
I'm trying to add a "Publish" link by the quick actions:
but I'm not exactly sure of how implement it.
Here's what I've got so far:
add_filter('post_row_actions', function ( $actions )
{
...
0
votes
1answer
34 views
option_active_plugins filter not working
I added a filter for option_active_plugins to keep most plugins from loading on an admin page. Confirmed to be on the right page and to be returning a properly altered array, but it's having no effect ...
2
votes
2answers
113 views
Filtering 'the_title' with option to return subhead?
Problem:
The WordPress iPhone app (and other WordPress-related smartphone apps) do not allow for much other than the Title and Body fields (i.e. no access to custom fields).
Goal:
My current ...
2
votes
1answer
40 views
What functions are included in apply_filter('the_content')
There is a function called apply_filter where you can use it like this:
echo apply_filter('the_content', $my_content);
It add formatting tags and clean up the content.
Trac or docs
I looked in ...
0
votes
1answer
57 views
Custom search form to display users only
I'm trying to build a custom search form for one of my pages. I need the search form to be able to search for users. Not only will it need to search for users, but by first name, last name etc.. ...
2
votes
1answer
156 views
How can I customize the wp_list_categories
I have a list of categories in woo-commerce which I'm trying to customize to be displayed to look like the following image.
I created the above image using normal HTML and css however I would like ...
7
votes
1answer
332 views
How to create an API for my plugin?
I have been developing plugins for WordPress. Most plugins I have developed with two three classes and not so huge like Buddypress, WooCommerce or etc.
I am planning to make two open source plugins ...
-1
votes
1answer
41 views
Search from Post on the basis of custom fields
I have shown all the Post on a page. Where i want to add Filter for sorting Like Date and other Custom Fields.
So how can i Do this Please Help me.
0
votes
1answer
30 views
Removing an action, or dequeueing style - Both not working
What I am wanting to achieve is to remove an action called inside of another action.
The action is calling a style, and although I have tried to deregister, and dequeue the style, it is still ...
1
vote
1answer
39 views
Make parent category not selectable when it has child categories
I'm trying to find a way of disabling the selection of the parent category within Wordpress 3.5.1 (post editor screen) only when that parent category contains child categories.
My structure:
...
1
vote
2answers
40 views
Replace a word with a word in the URL string
I'm trying to replace a word on every page for example "Denver" with a word from a URL string, so I'll have like ?city=Atlanta in the URL. So I was thinking of using PHP's GET to just get the city ...
0
votes
1answer
44 views
Adding filter to the title without affecting the menu title
Hi I'm having problems with the the_title filter here's the code that I have:
function zen_title_filter($title){
if(is_singular()){
if(!empty($_GET['asin'])){
if($title == ...
0
votes
1answer
18 views
Is it possible to put the add-filter()-hook into a function?
for my plugin with a lot of different features, I want to realize a mail-function to send HTML-mails. For this I have to add a filter-Hook like this:
function set_content_type($content_type){
...
2
votes
1answer
70 views
add_filter and remove_filter added before and after wp_query
I have just started with WordPress Development, and found following block of code online (in some tutorial)
function filter_where( $where = '' ) { // posts in the last 30 days
$where .= " AND ...
1
vote
2answers
107 views
Trouble understanding apply_filters()
In apply_filters()
apply_filters( $tag, $value, $var ... );
I'm having trouble wrapping my head around the $value and $var. I read the codex and it sounds like the $value can be modified, $var not, ...
0
votes
1answer
113 views
How to edit php code in WordPress Post file?
I have a wordpress page. In that wordpress page, user will have access to the following Window to Publish their Post in to the webpage.
If the user enters an URL in any of the three filed I have ...
0
votes
0answers
50 views
Wordpress - ABC filter/Pagination
I would like to list out the alphabet on a custom post type archive page, and by clicking on a letter in the alphabet it would link to a url that only displays posts that begin with that particular ...


