Tag Info

New answers tagged

1

I know this post is somewhat older, but I thought I would point out that the previous answer only works if there is always a title. If you want to make sure that only the content of the widget gets wrapped in a panel-body class, you might want to try something like this: function my_widget_content_wrap($content) { $content = '<div ...


0

Found it. Here is what I had to do : Instantiate a $trail : $trail = new bcn_breadcrumb_trail(); Create "breadcrumb item" : $b2 = new bcn_breadcrumb('MyAnchor', '<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="MyTitle" href="%link%" class="%type%">%htitle%</a></span>', array(), ...


0

This soluton will create a metabox on your Edit Post screen and show you four additional form fields - Name Position Publications Freetext It will then save the data in to a corrisponding DB table, with each field in it's own column as you specified. As you have not provided a table name I have guessed at wp_additional_post_info, but you can change that ...


0

This approach is not advisable as http://example.com/page/whatever-information/ is how Wordpress deals with child pages and .htaccess Rewrites is part of how Wordpress identifies what page is being requested and what queries to run. You should probably pass the whatever-information as something called a POST variable, then have code that runs on page and ...


0

You can edit the login form from your child themes functions.php using actions such as: function my_login_scripts() { //do stuff here } add_action( 'login_enqueue_scripts', 'my_login_scripts' ); This should at least allow you to get your jQuery running on the page. You can read more about this here: ...


0

Where are you pasting that code? The code snippet needs to be put in the right spot. So you need to copy the content-product.php template from the woocommerce plugin folder and place it in your theme folder in a "woocommerce" folder. Then paste that code within the Loop. Updated Answer: Okay so I believe that you need to use the get_post_custom ...


0

The changes were being made in a stylesheet that is auto-generated by the parent theme. In the specific case of the Cherry parent theme (which is widely used in templates sold on themeforest, templatemonster etc), you cannot make stylesheet changes in reserved files such as main-styles.css (Despite them existing in a child theme). The solution is to either ...


0

You don't do that with your permalinks. You can do what you want in Wordpress Settings. Go to your Wordpress dashboard, 2. Click "Settings", 3. Click General. 4. In the "Site Address (URL)" Box remove the "blog" part like this --> "http://site.myurl.com/ NOTE: DON'T CHANGE THE WORDPRESS ADDRESS URL!!! Only change the Site Address Here is a screenshot ...


0

I've again been looking in to this so I've decided to post an answer because I actually have done this using an AJAX call. As pointed out in the comments to my question by @Otto - The point of postMessage is that it's sending data directly, in the browser. It's not going through the server, so no, you cannot apply PHP filters to it unless it's using ...


0

You forgot the constructor Example: function __construct() { parent::__construct( 'foo_widget', // Base ID __( 'Widget Title', 'text_domain' ), // Name array( 'description' => __( 'A Foo Widget', 'text_domain' ), ) // Args ); } http://codex.wordpress.org/Widgets_API


1

By default an image belongs only to one post. Indeed that post is the parent post of the attachments (that are posts too). I think that the comment by TheDeadMedic is very good option because it is native to WordPress, but you can only link a post with one Featured Image. If you want to attach several files you can use the plugin WP Better Attachments ...


0

I think the wp_signon() function is unable to set the login cookies because you are calling it after the page headers have being sent. Try moving your auth code out of dlf_process() and into a separate function like this: function dlf_login() { if ( isset( $_POST['dlf_submit'] ) ) { dlf_auth( $_POST['login_name'], $_POST['login_password'] ); ...


3

I'm the author of that plugin and I can confirm there was an issue. It was in the GM\VirtualPages\TemplateLoader::init(); method. Issue was caused by an untested switch from array_merge to wp_parse_args. They are similar, but I would have to inverse order of arguments moving from one to the other. Shame on me. I fixed that in the Gist (source) now it ...


0

Ended up doing this, which seems much more simple: if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { // This is the Template for Category level 1 include(TEMPLATEPATH.'/location.php'); } else{ // This is the Template for Category level 2 ...


1

You could use the template_redirect hook to check and see if your post is a category and then whether it is a sub-category ... and if so, force a different template. For example (assuming you are using wordpress categories) function my_maybe_override_category_template( $template ) { # Make sure you are about to show a category term if ( ...


0

Here is a easier and cleaner way...call the node needed and use the part needed and replace what you want to update function np_replace_howdy($wp_admin_bar){ //New text to replace Howdy $new_text = 'Welcome'; $my_url = 'http://www.google.com'; //Call up the 'my-account' menu node for current values. $my_account = ...


0

Add this to your functions.php file, and note that you'll need to grab and edit the capabilities for each post type (Post, Page and Attachment) and taxonomy (Category and Post Tag). You should note that there are more capabilities than those listed, but I don't believe that the need changing. Therefore I advise you to output the default capabilites for ...


0

Eventually I did this in the function of my plugin where I was loading my game, $mycredhook = new my_demo_hook_class(); do_action( 'play_game', $mycredhook); Not sure if this is the correct way to go, but it worked.


3

Hopefully I've understood your question correctly, and I hope the code below helps. First you must add a metabox to hold the option that you wish to add to each Post, and the my_add_sticky_metabox() function will do this, in conjunction with the add_meta_boxes action hook. At this stage you are not actually printing anything, but rather telling WordPress ...


1

Interesting; I have never done this before. I preferred to create ScreenCast videos. I don't see any better alternative to using Cron Job for automation of database reset. Here is the link I found that may help you: How to reset MySQL Database using Cron Job Automated Reset of MySQL database to fresh install Here are a few Wordpress-specific links that ...


-1

You forgot this step, which mixes together the system and Google fonts: $typography_mixed_fonts = array_merge( options_typography_get_os_fonts(), options_typography_get_google_fonts() ); asort( $typography_mixed_fonts );


0

http://wpquestions.com/question/showChrono/id/8603 I used the first function using str_replace add_filter( 'wpseo_breadcrumb_output', 'custom_wpseo_breadcrumb_output' ); function custom_wpseo_breadcrumb_output( $output ){ if( is_page() ){ $from = '<a href="">...</a>'; // EDIT this to your needs $to = ''; ...


0

You could do this in two ways. 1) Leave the pages as separate pages in the WordPress dashboard and create a custom page template that lists those pages content. Assign this custom template to the homepage. 2) Move the content of those pages into the homepage editor. Option 1: A much cleaner option and allows you to revert to individual pages at a later ...


1

Based on the comments, you should be able to do something like the following: Create a custom taxonomy to hold your Temporadora items in (e.g. Temporadora 1) Create a custom post type to hold your episodes Create a relationship between the two From there, it should be a matter of doing something like the following: $args = array( 'orderby' => ...


1

Its not identical to Drupal Views, but i think WP Views is the closest you will get to Drupal Views. I am a Drupal guy, and i use WP Views for every Wordpress project i create.


0

Maybe this will work for you: function tag_focus() { if( isset( $_GET['taxonomy'] ) && 'YOUR_TAXONOMY_HERE' == $_GET['taxonomy'] ) : ?> <script type="text/javascript"> jQuery( document ).ready( function() { jQuery( '#submit' ).click( function() { jQuery( '#tag-name' ).focus(); } ); ...


0

You can use wp_register_script() then wp_enqueue_script() to inject javascript into wp admin. functions.php or plugin (my personal recc would be a simple plugin): wp_register_script( 'focus-tag-name-script', 'path/to/script.js' , 10 ); wp_enqueue_script( 'focus-tag-name-script' ); script: jQuery( window ).on( 'load', function() { jQuery( ...


0

This should work. Just make sure that meta key is Project ID. function projects_posts() { global $post; $project_posts = get_posts( array( 'post__not_in' => array( $post->ID ), 'category_name' => 'team-resources', 'meta_key' => 'Project ID', 'meta_value' => get_post_meta( $post->ID, 'Project ...


0

If Settings->General didn't work better login into database (through control panel or http://website_name.com/phpmyadmin) search for wp-optionsand change blogname.


0

I think you may be misunderstanding something (or not fully explaining something). If you click the "Edit" link under each post, it'll take you to the edit page for that post/page/whatever. The bulk edit actions are the ones in the dropdown on the top bar. You need to select as many posts as you want, choose an option from the dropdown and then click on ...


0

Text that is displayed after you click on browser RSS icon depends on the feed reader you are using. I don't think you can modify what it displays directly through WordPress (correct me if I'm wrong). A simple workaround to achieve something similar to what you want would be placing feed links to different categories. You can place a link for every category ...


0

The post status values seems to be hardcoded in the core. Here's the status box code for the edit screen: <span id="post-status-display"> <?php switch ( $post->post_status ) { case 'private': _e('Privately Published'); break; case 'publish': _e('Published'); break; ...


1

If you aren't familiar with web technologies, you have a long road ahead of you. That being said, if you have built an iOS app then you probably know something about programming and are willing to travel that road. The best place to get started would probably be the Wordpress Plugin Developers Handbook If you can map the wanted functionality into custom ...


0

I'd change the priority on add_action to 1 and see if that fixes things. To the best of my knowledge, priority must be an integer between 1 and 99 inclusive. Use 0 or 100+ and I don't believe that your action will ever fire. I'd also recommend changing the names of your registered statuses to match those that exist (e.g. all lowercase with no spaces and ...


2

This code will do the job. add_action('customize_register', 'themename_customize_register'); function themename_customize_register($wp_customize) { $wp_customize->remove_section( 'static_front_page' ); } It will remove Static Front Page option. Details here


1

I looked for a solution too, but it's too complex. I purchased a plugin: Swift Security. I hope it helped.



Top 50 recent answers are included