0
votes
1answer
18 views

Add rel to all images in a post

I want to add a rel to all images in a post. I am trying following filter but it will wrap only the images which are in the gallery. It does not wrap the images which are added individually without ...
1
vote
3answers
66 views

Show excerpt for only first post in query

I'd like to only show the excerpt for the first post in my main query. I was wondering the best way to approach this. What I have tried so far is: Making a custom homepage and using two queries, ...
0
votes
1answer
64 views

Allow tags and attributes in post and pages content

I am trying to allow the "onclick" attribute on links as well as some html tags such as iframe to the content displayed in posts and pages. In my theme's functions.php file, I tried removing ...
1
vote
0answers
35 views

Filter categories used with Custom Structure Permalink

I'm using a "Custom Structure" permalink setting: http://mysite.com/%category%/%postname%/ However, when the post belongs to uncategorized, or to more than one category, this produces unwanted URL ...
0
votes
0answers
56 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...
0
votes
1answer
46 views

How to conditionally add a wp_filter

I have a WP filter I created that I only want to run on certain menu items. I am attempting to use - function add_nav_class($output) { $output= preg_replace('/<a/', '<a class="lsbb"', ...
0
votes
2answers
71 views

Filter didn't work on content class (hybrid_post_attributes)

I'm developing my new theme using Hybrid core framework and trying to add my class item on hybrid_post_attributes generated class using filter with this code. add_filter( 'hybrid_post_attributes', ...
0
votes
1answer
79 views

How to set default values for edit_post_link() in my theme?

How do I set default values for the edit_post_link function in my theme? I'd like to change the 'Edit This' string to a custom value, but specify this only once, so I can use instead of everywhere. ...
0
votes
1answer
57 views

How to disable thumbnail filter for a specific template part or image size?

I am filtering post_thumbnail_html in my theme to modify the output of my image tags. I have one template part that I would like this filter not to apply to. It uses an image-size that is used no were ...
2
votes
2answers
241 views

Add class to before_widget for all widgets with a dropdown and a counter

Some predefined widgets offer the option to use a select element (dropdown) and/or a counter after each entry. How can I add the CSS classes widget-with-dropdown or widget-with-counters to these ...
0
votes
1answer
298 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); ...
2
votes
1answer
859 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 ...
3
votes
1answer
778 views

How to remove the Theme Customization Button from the dashboard and themes options page?

In my Wordpress theme that I've currently been building I do not take advantage of the Wordpress Theme Customization API. As much as I would like too, I've invested far too much time into my own ...
2
votes
1answer
244 views

How to Auto Approve Comments on a Specific Page?

I am using WordPress comments on a page as a Contact page and I am able to show those comments only to logged in admin. Now I would like to automatically have any comments placed on my Contact page ...
3
votes
5answers
402 views

How do I make a theme “plugin-ready”?

How do I revise a theme so that I can publish my event hooks and anyone can build a plugin to add new functionality easily to my theme?
0
votes
1answer
350 views

Tiny MCE custom styles, and preview in the backend

I've added the styles dropdown list to my TinyMCE editor in Wordpress. If I select the style, and preview it on the front end, it looks exactly like I expect it to. However, I'd like to preview it ...
0
votes
1answer
372 views

Replace single_template filter with what for default posts?

I was going through a tutorial on Justin Tadlock's blog but it uses the single_template filter, which was removed in 3.4. The codex says to use {$type}_template but if I use "post_template" with the ...
2
votes
1answer
962 views

How to use filter hook 'post_updated_messages' in coherence with action hook 'save_post'

I am trying to send out e-mail, SMS and IM notifications to group members of this WordPress website, whenever a WordPress page in their user group has been published/updated. I figured using the ...
0
votes
1answer
661 views

Should I use add_filter for functions in function.php of the theme?

I have written few functions in the function.php file of the theme. Should I use add_filter function for those functions?
2
votes
2answers
910 views

What filters are applied to the_content function?

How does WordPress convert raw data from the database to a readable format in the_content function? I've noticed that it applies the_content filter, but what does the_content filter do?
0
votes
1answer
839 views

CSS class on last post in loop ( custom query )

I have been using this question to try to do this but I am having some difficutlty. I have a custom post type, media, and I am working on the archive-media.php template. I have it partially working ...
1
vote
0answers
153 views

Carrington Build: Overriding module view file not working [closed]

I am attempting to create a filter in my theme to override the view file used for the Loop Module in Carrington Build, but nothing is happening. function my_load_loop_view($view, $data) { ...
0
votes
1answer
774 views

content filter (add_filter) for category description?

I'm running an add_filter function on the_content and I need to run the same function on the category description. Does something like that exist or do I need to create a custom function for it?
3
votes
4answers
668 views

Run shortcode before filters

My users post snippets code in comments. I created a shortcode for this : function post_codigo($atts,$content=""){ return '<code>'.$content.'</code>'; } ...
5
votes
3answers
2k 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 ...
1
vote
1answer
424 views

Pass variable to hook. Its possible?

I have this hook created to retrieve user password when he register or update his pass. I dont want my client to touch wordpress core so i was planning to use a hook in wp-includes/user.php All this ...
2
votes
2answers
2k views

Get password when user registers and save it sha1 into database

im working on a website where the users can connect with iphone to some functions of it by using a sha1 encrypted password. In other words the plain password of wordpress encrypted in sha1. In the ...
2
votes
1answer
342 views

Wordpress Genesis Child Theme Filter divs

I'm trying to html5ize a Genesis child theme. So far I've figured out how to replace the Doctype via hook but am having trouble figuring out how i can change the divs to sections and articles without ...