Tag Info

New answers tagged

0

You can use something like this to get the parent page URL (and show its page title): <?php if ( $post->post_parent ) { ?> <a href="<?php echo get_permalink( $post->post_parent ); ?>" > <?php echo get_the_title( $post->post_parent ); ?> </a> <?php } ?>


0

You can take the following steps Go to You Dashboard Click Appearance > Menus Under Pages, Click View All There will be a 'Home' option Check that Home Option Click 'Add to Menu' The new Menu item will appear in the right block Drag the home menu to the top Save the menu


1

You can use Advanced Tinymce plugin to solve your problem. This plugin enables the advanced features of TinyMCE, the WordPress WYSIWYG editor. It includes 15 plugins for TinyMCE that are automatically enabled or disabled depending on what buttons are chosen. You can see demo here.


0

As suggested, just add a container around the content. You do not want to str_replace() or preg_replace() your markup. It is resource expensive and prone to error. So... <div class="html-content"><?php the_content(); ?> </div> Then... .html-content a { } In fact, chances are you already have markup in your theme similar enough to ...


1

you can use: add_filter('the_content', 'addClassToLinks'); function addClassToLinks($content){ return str_replace( '<a ', "<a class='myclass'", $content); } But i don't recommend it. Just add in theme an specific class for container of the content. It is cleaner and use in css: .myclass a { // css for a that is fount inside myclass }


1

It would be more efficient to add a container with a certain class name around content that has been created with the HTML tab. That way you're avoiding the code getting bulky.



Top 50 recent answers are included