A type of hook that provides a way for content to be overridden programatically

learn more… | top users | synonyms (5)

-1
votes
0answers
5 views

Is it possible to add custom text blocks in woocommerce email for different country buyers?

Is it possible to add different text blocks for buyers from different countries in woocommerce customer-invoice.php? I am dealing with a situation where I want to add a custom text block in customer ...
0
votes
0answers
20 views

How to filter content for specific content variable

I created a plugin that adds content from another post, and places this content next to the original content. I can say, that this content should appear at the bottom of the original post content. I ...
0
votes
0answers
11 views

How do I let users specify interests on signup and have this reflect content displayed on homepage?

I'm looking for something that will allow my site to have the following functionality: A user creates a login for my site. When creating a username and password, they also select from a list of ...
-3
votes
0answers
16 views

Woocommerce with Different Paypal accounts

I have set up a store for a chain of restaurants, there is a section to select location of Store, So What I want is, assign separate paypal email accounts for each store locations, so When a Customer ...
0
votes
1answer
19 views

How to sort posts according to meta value?

How can I sort all the posts according to their meta value? I am using the below code: $args = array( 'meta_query' => array( array( 'key' => 'wpcf-stream', ...
0
votes
1answer
26 views

Get_template_part inside filter?

Is it possible to remove gallery from content but in its place do get_template_part('content-gallery'); ? I have this piece of code which removes gallery from post but I am inserting ...
-1
votes
0answers
8 views

Woocommerce Hide Price Match when price is empty

I have a module on woocommerce which is the Price Match, however intended to hide when the product has an empty value. Someone I can help?
0
votes
0answers
18 views

Combined filters

I have a problem and i'm really stuck on this one. I have a small 'woodshop' and i want people to filter the results. The case: When i check multiple brands, the types should be updated. But when i ...
3
votes
0answers
19 views

Adding a drag and drop re-ordering from a custom post type default list

I have custom post type named 'slider_to_be_ordered' and has the following arguments enabled: 'supports' => array( 'title', 'page-attributes' ), 'hierarchical' => true, ...
0
votes
0answers
14 views

How to store a number (coming from cookie) into query vars for later usage in other filters?

I have a small HTML5 game playable (as "canvas") at different social networks, which sets an HTTP cookie. When a player comes to my Wordpress site (acting as help and support website for the game), I ...
1
vote
1answer
17 views

Shortcodes not resolved in AJAX call response

I have a simple function, which returns the content of a page with the given pageID: function get_page_content(){ $id = $_REQUEST['id']; $page_data = get_page($id); echo ...
0
votes
0answers
24 views

how to apply filter to url of wordpress embed shortcode

I use wp embed shortcode to embed videos from my server into my posts. For some reasons i changed my server address and now i want to apply the following function to url of wp embed shortcode. Please ...
1
vote
0answers
20 views

Posts and Attachments with “Published” status in Search

I would like the search to show only published posts and attachments (the attachments are photographs taken directly from the media library). The trouble is, when I specify that the post_status must ...
1
vote
0answers
19 views

Wordpress form. Variables to display on other page? [closed]

I'm using Ninja Forms, and I'm working on a form where when the users presses "ok" then the page is supposed to go to another page which shows specific information and links for that user. Right now ...
0
votes
1answer
19 views

How to append custom text to the output of 'categories widget'?

How do I customize the "categories widget" to append additional text on the sidebar display? from category 1 category 2 category 3 category 4 to category 1 folder category 2 folder category 3 ...
2
votes
1answer
28 views

How to exclude certain widget from showing up on home/front page? [duplicate]

Without using a plugin, how do I prevent/exclude the sidebar widget "recent posts" from showing up on the home/front page? I do want it to show on the sidebar of rest of other archive/post pages.
1
vote
1answer
27 views

Insert term when page is published - avoid duplicates after edits

So i want to dynamically add terms to a custom taxonomy named after new pages when these are published. Problem I have is that when you edit the page titles, another term will be added to the ...
0
votes
0answers
21 views

Issues with title-tag and document_title_parts

Wordpress version 4.5.1 I'm trying to dynamically update page titles on a particular template. After lots of digging and learning about the wp_title() changes, I'm attempting to use ...
0
votes
1answer
18 views

Woocomemrce order and registration fileds to UPPERCASE

I have to transform all the registration fields (Name, Surname, email, State, Address...) to uppercase. I mean no CSS transform, like text-transform: uppercase; but transform in PHP before they go to ...
-2
votes
2answers
53 views

Customise Jetpack Publicize text

EDIT: Due to downvotes (with no comments!), I've edited this post to be a bit more specific... Why isn't the following change working? $custom_message = get_the_title( $post->ID ) .''. ...
1
vote
1answer
34 views

'the_content' filter removing html tags from post content

I have a post content(html) like this: <div id="home_tabs"> <ul> <li><a href="#tabs-1">Nunc tincidunt</a></li> <li><a href="#tabs-2">Proin ...
0
votes
0answers
27 views

Conditionally (cpt) filter previous and next_post_link

I'm using the next_post_link and previous_post_link functions in two different scenarios, first in my single-cpt.php and second in my single posts. The name of my cpt is "members". Note, that I'm ...
0
votes
1answer
20 views

How to add content with a filter when there's no content in the editor

I'm building a plugin to create page sections (with ACF and repeater field) and I want to add the sections at the end of the content. The sections are added to the content, but only when there's ...
0
votes
1answer
22 views

Remove filter callback: method in class

I need to disable this filter: $message = apply_filters( 'woocommerce_mail_content', $this->style_inline( $message ) ); The style_inline() function exist in a class called WC_Email. So I tried: ...
0
votes
1answer
43 views

How to add aria role and schema markup to custom walker container

Edit: after doing some research I've found that in the wp_nav_menu function uses the following code to display the containers value. if ( $args->container ) { /** * Filter the list of ...
0
votes
2answers
33 views

Problem with images URL after filter applying

I have this code in my functions.php file: function user_content_replace($content) { // it's not a URL, let's apply the replacement if (!filter_var($string, FILTER_VALIDATE_URL)) { ...
0
votes
4answers
58 views

How to filter out shortcode when displaying the_excerpt() in the loop?

I'm using the_excerpt() in my template loop to display post excerpt on the front page. It's currently displaying unwanted shortcode directly on the front page eg. [box]post content[/box] ...
0
votes
0answers
17 views

How can I deny the user the insertion of emails in topics / comments and stay on the same page?

I have this function that checks whether or not a content contains an email: function fw_check_if_content_contains_email( $content ) { if ...
0
votes
1answer
15 views

Hook added to the_content seems to be called multiple times

I have the following code running in a plugin: add_filter('the_content','thousand_pay'); //Callback function function thousand_pay($content) { echo $content; if( !in_category( 'Stories') ) ...
0
votes
1answer
24 views

Apply filters when loading post via ajax

Have been trying to solve this for couple of hours already. Here's the case: I'm making a plugin that separates the posts into pages using the <!--nextpage--> tag. It works fine but I want to ...
0
votes
1answer
23 views

I need to hook and change language of facebook sdk

I need to hook into this function to change language to from en to french facebook sdk. $facebook_sdk_src = apply_filters( 'bimber_facebook_sdk_src', ...
3
votes
2answers
34 views

Where to hook into post content?

Which hook or filter is used to edit the post content before the_content filter is applied to it. For instance, if I wanted to add Hello World, as the first text in every post.
0
votes
2answers
52 views

How to get a single hook from wp_head()?

I am working on a custom post type and I don't want it to get all the clutter from wp_head(). However, I do want to show a specific hook, for example the YoastSEO meta tags. How do I call a specific ...
4
votes
1answer
38 views

Add post/page ID to inserted links within the_content

Within the main content editor of posts and pages, we can insert multiple links to other posts/pages: <a href="http://example.com/hello-world/">Hello World</a> What I am trying to do is ...
2
votes
1answer
42 views

add_filter() function misunderstanding

I'm studying the theme "one page" and there is the following code: function onepage_sections() { $sections = array(); $sections['service_section'] = array( 'id' => 'service_section', ...
0
votes
1answer
23 views

WP 4.5 hide core customizer sections

Since WP 4.5 the way you hide core components from the customizer was changed. Changed from $wp_customize->remove_panel() to customize_loaded_components. ...
1
vote
3answers
49 views

Add code inside specific wordpress standard function

Is it possible to add a piece of code snippets inside wordpress standard function ? In my case I am developing a plugin that will trace the exact location of the caller of wp_delete_attachment method ...
0
votes
1answer
23 views

previous_post_link inside of a function?

I'm missing something on how to call previous_post_link() inside of a function. I also tried assigning the output to a string variable and using that. function prevnext( $content ) { $content .= ...
0
votes
1answer
19 views

change “missing attachment” text functions.php

WordPress core file: wp-includes/post-template.php has this text "Missing Attachment" that i want to change with "-". The problem is that when WordPress upgrades, the file is changed back to the old ...
0
votes
1answer
15 views

How to filter Sidebar Content

I want to filter sidebar content generated from dynamic_sidebar() and only return the last 2 calendar years of archives (not last 24 months). Is it possible to do this sort of filtering and how?
0
votes
1answer
23 views

Adding bootstrap classes to video shortcodes

I want to make videos responsive... There is a function in /wp-includes/media.php file: line 2497: $html_atts = array( 'class' => apply_filters( 'wp_video_shortcode_class', ...
0
votes
0answers
22 views

Filter Posts in The Grid plugin with meta key

I’m working with a WordPress plugin, The Grid. http://themeone.com/the-grid/ I'm using it on the site I'm building to filter a custom post type called "Projects" which users have the ability to ...
0
votes
0answers
11 views

Filter User Query via URL Like Posts

I have two taxonomies assigned to users and I use them to create a user query and output the users. One of the taxonomies is ESPECIALIDAD, the other is REGION. When I am in: ...
-1
votes
1answer
33 views

Using a filter in functions.php to add content to single posts regardless if post is in main or child category

Im using following filter (codex) to add some html content with a lower priority (20) to the bottom of my single posts wich are in a specified category: add_filter( 'the_content', ...
1
vote
1answer
26 views

Which hook is fired when inserting media into a post

I want to add numbering to each image when I insert them into the post. For example if I insert 3 images into a post, there will be: Image 1 Image 2 Image 3 I looked through the WordPress ...
1
vote
3answers
55 views

How to reduce original image quality on upload?

I know that I can use the jpeg_quality filter like this: add_filter('jpeg_quality', function($arg){return 75;}); This will reduce the image quality of the images generated during the upload process ...
0
votes
2answers
24 views

Passing stored variables to add_filter

I am working on a site where the page titles are generated dynamically from external data sources. So obviously, Yoast SEO/WordPress SEO doesn´t know anything about the correct title, description, ...
0
votes
0answers
15 views

Removing commercial theme's custom autop on specific pages via functions.php

So my problem is with using the custom theme Karma at http://themeforest.net/item/karma-responsive-wordpress-theme/full_screen_preview/168737 Great theme.. except it removes the default ...
0
votes
0answers
14 views

Unhook (or remove) Sidekick Customizer Option using a function

How do I remove / disable / hide the "Click for Help" Sidekick Drawer? I'm reading over the codex and I just don't see anything relevent between this and the plugin. I downloaded the plugin, start ...
-3
votes
1answer
30 views

Woocommerce: Only one review per verified buyer [closed]

By default, Woocommerce allows multiple reviews by a single user. What I want is to allow only one review from verified buyers.