Edit <title> in bbPress homepage - wordpress

I want to do something like that: <title>Custom text...</title>
On the bbPress homepage. I've spent hours looking for the answer and I can't find it...
I know that it's possible to create page and add shortcodes like here: https://codex.bbpress.org/features/shortcodes/
But in this case it doesn't work if my root slug for bbPress is the same like the page. If slug is different - I will have two homepages :/
Do anybody had similar issue?

you can use this hook to execute your custom code top of the bbPress homepage.
'bbp_template_before_forums_index'
example:
add_action( 'bbp_template_before_forums_index', 'your_callback_function' );
function your_callback_function(){
$output_html = '';
$output_html .= "<title>Custom text...</title>";
echo $output_html;
}
use this code in your functions.php file, i hope it'll help you.

Related

Avoid displaying the share buttons in the post contained in my home page

I am creating a website using the Candidate theme in wordpress.
There are a number of posts in my website. My home page is set to show the most recent five posts in it.
I have used a plugin named as 'Share This' to show the share buttons for facebook, twitter and google+ just above the contents of my posts. The buttons got displayed above the contents of the posts. Now the problem arose when the buttons got displayed in my home page too where the recent posts along with a short summary is displayed.
This started looking quite mess. I tried a lot to remove these but couldn't.
While researching for this, in some wordpress support forums, i found that the following codes may work
remove_filter( 'get_the_excerpt', 'st_remove_st_add_link', 9 );
remove_filter( 'the_excerpt', 'st_add_widget' );
This did no chage. And I used the following code too
function remove_sharethis() {
if ( ! is_singular( array( 'post', 'page' ) ) ) {
remove_filter('the_content', 'st_add_widget');
remove_filter('the_excerpt', 'st_add_widget');
remove_action('wp_head', 'st_widget_head');
}
}
add_action( 'template_redirect', 'remove_sharethis' );
Is there any way to do so??
I need help desperately.
And even the buttons are not seen completely. They are seen cut-off.
And there is one more problem in this. If I try sharing the posts through facebook share button of this plugin, the contents of the posts donot load at the share screen. Rather it just shows the website's name.
Please help me if there is someone who has better knowledge in this sort of problems and this plugin.
Simple solution, you could use CSS to hide the share buttons from your home page.
Will help if you can share a link to the homepage
The AddThis plugin author responds with specific help to postings here.
HTH

Seo yoast plugin, breadcrumbs

This is question on the seo yoast wordporess plugin.
I have a friend who doesn't know that much about code/wordpress/etc, they have an ecommerce site built using magento and a blog using wordpress which is styled to match the main site and they use yoast seo plugin for seo etc. They have asked me to try an get the breadcrumbs working for them in a different way to what i know, from what i can see they want to add a prefix to the breadcrumbs 'home' which links to main site then renaming the blog from home to blog, for example home(main site) > blog(blog) > post.
Now i did just that in the plugin settings but they said that the schema markup wouldn't be complete and said there’s a filter hook called ‘wpseo_breadcrumb_links’ which gives access to the array of URLs and anchor text used to build the breadcrumbs, now i cant find anything on google that explains this or how to start writing it, i do know that it needs to go in the functions file.
Would it be possible to get some help on this.
Thanks in advance and very much appreciated.
Justin
I'm not sure what Schema.org markup has to do with breadcrumbs! :) Schema is used on post/page level. So, they are either oversmarting themselves or I got you wrong.
I think this sample code may be helpful:
add_filter( 'wpseo_breadcrumb_output', 'custom_wpseo_breadcrumb_output' );
function custom_wpseo_breadcrumb_output( $output ){
if( is_product() ){
$from = '<span typeof="v:Breadcrumb">Products</span> »';
$to = '';
$output = str_replace( $from, $to, $output );
}
return $output;
}
It looks like wpseo_breadcrumb_output gives you access to the entire output instead of just the link portion. Please see this page for more details: http://wpquestions.com/question/showChrono/id/8603

Wordpress adding thumbnails to category

How to take on a problem in WordPress admin editing.
I'd like to edit an edit-category admin panel to add a featured image to it (just like in posts), but I'm a bit indecisive since a lot of people use a custom field with static path to a photo, but I'm wondering is there a way to do it better(enable some wp hook and such).
Can someone point me in the right direction?
Thanks for the plugin it seems good, but i have one additional problem. It seems i have a lack of knowledge on how to query an object [category] so i can apply filters, hope im making some sense. This is done on my home.php. all dumps are null
<?php get_header();
$listcat = get_categories('hide_empty=0');
foreach($listcat as $x){
$img = apply_filters( 'taxonomy-images-queried-term-image', '');
var_dump($img);
}
get_footer(); ?>
The same code works with no problems if i stick it in category.php. Any ideas? :)
i've used several times the plugin "Taxonomy Images". it works with multi-language wp installs too.
link with instruction: http://wordpress.mfields.org/plugins/taxonomy-images/

Archive Page in Wordpress?

I want to know how to make an archive page like instantshift has made.. link below..
http://www.instantshift.com/archive/
I have made everything but don't know the query to specify the orderly archives listing
I use Viper Bond's Clean Archives for a similar effect: http://www.viper007bond.com/wordpress-plugins/clean-archives-reloaded. I like that the jQuery effect only shows when you activate the plugin in a page.
You could also use <?php wp_get_archives( $args ); ?> as found here: http://codex.wordpress.org/Function_Reference/wp_get_archives
Don't forget to not leave wordpress.stackexchange.com lonely too!

How to enable tinyMCE rich text editor for post Comments in WordPress?

I would love to kinda replicate WordPress post/page text editor (Admin panel) in comments section. That's how site users will be able to format text easily. A good example of what I actually need can be found here at StackOverflow when someone is about to Ask Question.
In your functions.php, add the following snippet:
add_filter( 'comment_form_defaults', 'tinymce_comment_4265340' );
function tinymce_comment_4265340 ( $args ) {
ob_start();
wp_editor( '', 'comment', array('tinymce') );
$args['comment_field'] = ob_get_clean();
return $args;
}
It's working on WordPress 3.5 and Twenty Twelve theme.
The TinyMCEComment WordPress plugin could help you out. It uses the internal TinyMCE editor (bundled in WordPress 2.0 and up).
Try this tutorial. It worked for me. The above answer might add TinyMCE to the reply section. The tutorial shows how to fix that.

Resources