Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels


Channel Catalog

Channel Description:

WordPress › Support

older | 1 | .... | 338 | 339 | (Page 340) | 341 | 342 | .... | 413 | newer

    0 0


    Via Settings > Reading I can set a static page for homepage and blogpage.

    I use this in header.php to determine whether a frontpage and/or blogpage is loaded or not:

    <?php if( is_home() || is_front_page() ) {?>
      // header image and header widgets are loaded
    <?php } ?>

    When I set a static blogpage I don't want to display header image and header widgets.. With code above they are. But what should I add above?

    Did not found the answer here unfortunately.

    0 0

    show the subcategory blog post making category-all slug where all the single blog post is shown.

    <center>Category: <?php single_cat_title(); ?></center>

    //for this category on an archive page, get the ID
    $thisID = get_query_var('cat');

    $get_children_cats = array(
    'child_of' => $thisID //get children of this parent using the thisID variable from earlier

    $child_cats = get_categories($get_children_cats);//get children of this parent category

    foreach ($child_cats as $child_cat) {
    //for each child category, get the ID
    $childID = $child_cat->cat_ID;

    //for each child category, give us the link and name and description
    echo " <cener><div class='col-md-3' style=' height:120px; width: 30.303%; float: left; margin: 0 1.1% 1.25em; background-color: #59BCD9; color: #fff; text-align: center; padding-top:50px;'>";

    echo '<h2>' . $child_cat->name . '</h2>
    echo '<p>' . $child_cat->category_description . '</p>';
    echo '</div></center>';

    } //end of categories logic

    0 0

    HELP I would like to change the color of the page-title
    I have looked in the styles sheet and can change the font colors but it is to no avail I cant seem to find it or a css code
    The color is a peach and I would like it to be inline with the rest of the site

    my site is

    thank you

    0 0

    Hey there

    I am developing a site in which I have to do the following filter of years and writers, such as:

    2014 -> Writer 1 Writer 2 ...
    2015 -> Writer 1 Writer 2 ...

    Every post created that year should be placed and writer belongs.

    What is the best way to do this filter to remove the list of post according to the chosen filter option ? Doing the loop in php.

    Categories , tags , actual date , custom fields , custom post ?

    Any ideas ?

    Thank you

    0 0

    Is there a way I can build a page for an end user to choose an item, from a list of items which can be saved and then referenced by a PHP function?

    For example:

    I need to provide Gravity Forms a form recipient email address based on the oncall user who's been selected in the front end of the site.

    So using the filter below, I'd need to write a function that get's the current oncall persons info from a page that the client has chosen from a list.

    add_filter( 'gform_notification', 'your_function_name', 10, 3 );

    I'm not asking how to write the function, but rather how do I create a list where the selection can be stored and retrieved by a function?

    I hope this makes sense. I'm new to all this :-D

    0 0

    I use some smilies that are in brackets fe. [Xd] etc. and I want to to be able to parse only this group without the mandatory whitespace.

    I'm not good enough with php to figure it out myself.

    I searched, but failed to come up with a decent answer.

    Anyone here knows how to do this?

    0 0


    I wonder how to add a post as a "sticky post" with a mysql query ?
    Any idea ?

    0 0


    I would like to start up adveticing on Facebook, for that I need to copy a pixel-code and add in to the homepage. But I can't change the code for the page, I can only get a read-only view, so I can't paste the code into the page source.

    my website is:

    I hope someone can help me out

    Best regards

    0 0


    When I changed the theme, I want to remove the value of the theme options,

    when change with theme customizer, it seems not be used switch_theme hook.

    In the customizer, a hook that works when change the theme?

    Thank you.

    0 0

    Hello everyone!

    I'm trying to get the user language inside the functions.php file in order to load some translations. The problem is that get_locale seems to be empty inside functions.php
    This is what I have in my functions file:

    $locale = get_locale();
    $lang = substr($locale, 0, 2);
    wp_enqueue_script('validate_languages', get_stylesheet_directory_uri() . '/js/localization/messages_'.$lang.'.js', array( 'jquery' ));

    This is the error I see in the console:


    I have also tried to use $locale alone (just in case native substr() funtion was not working), but I get the same error.

    0 0

    Is there a way to remove the need for passwords and email addresses when a user choose to register on my site?

    I am aware of the issues that can be with multiple accounts having same name!!!

    0 0

    Want to list the categories in the reverse ordering (with the most populated category first). Any help appreciated!

    0 0

    I am trying to run the below query and output but getting the error as seen below. I get you should add an argument but with a query that really doesnt have one what do you do?

    Just trying to get all email addresses from comments and display them.

    $myrows = $wpdb->get_results( $wpdb->prepare("SELECT DISTINCT comment_author_email FROM wp_comments" ));
    foreach ( $myrows as $myrows )
    	echo $myrows->comment_author_email;

    Warning: Missing argument 2 for wpdb::prepare()


    0 0

    I have created a custom Payment Gateway for a special EFT system we have setup. The Bank Account and Routing Number are supposed to get encrypted then sent to a Salesforce via the WooCommerce webhooks to be processed.

    Unfortunately, I cannot figure out how to add the Bank Number and Routing Number as line-items to the Order Webhook. I have been able to add them to the product line of a webhook, but that is not helpful, because it makes the webhook messy when every product has the bank number and routing number in the array. I feel like I've tried about every hook and filter, and I've tried to look in the hooks and filters of some other payment gateways and i have not been able to figure it out.

    Any clues on how I can hook a field in a payment gateway to the Order webhooks?

    0 0

    I have a class to add a list of terms to a post when it turns from draft to publish. The function is correctly triggered and the code (now, because I have commented almost all lines) is as simple as this:

    class setCategoriesRight
        public function __construct()
            add_action( 'draft_to_publish', array( $this, 'publish_post' ) );
        public function publish_post($post)
            if('myposttype' == $post->post_type) //Si pertenece al custom post type agencia o experto
    			$post_id = $post->ID;
    			$categories = array(11, 12, 13, 14, 15);
    			wp_set_post_categories( $post_id, $categories, true);
    new setCategoriesRight;

    After the function is fired, the wp_term_relationship table is completely unaltered.
    What I'm doing wrong?

    0 0

    I've created custom taxonomy with Types plugin (Currently deactivated).
    In my DDBB I can see in 'wp_term_taxonomy' a good list of entries with terms and this category 'mytaxonomy' associated to them.
    If I try to check if the category exists with taxonomy_exists() it saids it doesn't, if I search for empty ones:

    $taxonomy = 'mytaxonomy';
      'hide_empty' => false,
      'orderby' => 'name',
      'order' => 'ASC'
    $tax_terms = get_terms($taxonomy,$term_args);
      echo $tax_terms->get_error_message().'<br />';
      echo 'No error';

    It doesn't exists neither. If I search for custom ones, not built in:

    $args = array(
      'public'   => true,
      '_builtin' => false
    $output = 'names'; // or objects
    $operator = 'and'; // 'and' or 'or'
    $taxonomies = get_taxonomies( $args, $output, $operator );
    if ( $taxonomies ) {
      foreach ( $taxonomies  as $taxonomy ) {
        echo '<p>' . $taxonomy . '</p>';

    It doesn't appear...
    What is exactly what I can see in the DDBB?
    A delusion????
    A need a break now, can somebody, please, explain me this?

    0 0

    Hi there,

    I need to sort post when displaying with archive page.
    I want post in randomize order except some which are market as "partner". These must be displayed first.

    I don't know how to do that.

    Using custom field or taxonomy ?

    Thanks for your help.

    0 0

    Greetings -
    I am uncertain if this should be in plugins or theme forum, but that depends on the answers. Feel free to move it if appropriate.

    I have a client that has a website with 1500 posts. Each post consists of ONE image, no text.
    I have changed to the Oria theme (and made a child), and in doing so need bigger images.

    I altered the media sizes in the control panel, to "medium 900px".
    I then ran the plugin regenerate thumbnails..

    But I cannot get the images in the posts to update from the old medium (500px) to the new medium (900px).

    (I also tried the plugin "really regenerate thumbnails" - no dice).

    If I go into edit in the post and click the edit for the image, it says "medium 900", and if I then just click update (without touching anything) it will get the image right. But clearly: I cannot do this for 1500 images.

    This kind of makes sense, as the actual code in the post looks like this:
    <a href="" rel="attachment wp-att-163"><img class="alignnone size-medium wp-image-163" title="snow" src="http:/" alt=" " width="500" height="500" /></a> it still uses the 500x500 thumbnail. Deleting that particular file is also not getting me anywhere.

    I tried fixing it with css (img first child width), and that kind of works, BUT it then takes the 500px image and upscales this to 900px which is not acceptable (gets slightly fuzzy).

    I also tried disabling all plugins, went over every setting I could think of, deactivated Jetpacks image control, tried looking in the various php files, hoping to find a clue in functions. I am not a programmer but are fine with testing various blocks of code – if I just knew what to try.. :S

    So, now I am at the point where I just want to override: some magic piece of code in my child theme function to either replace everything related to 500px, or override all images in content div with original (big) picture and downsize to 900px.

    Or, am I missing something other, blindingly obvious? Is it perhaps a theme problem?

    Anyone out there that can lend me a hand?

    0 0

    Hi !

    I can't figure out how I must proceed in order to move my image from :first two :last with jquery.

    I'm making an infinite slider on :hover, for the moment, it kind of work.
    But the images don't replace so it's not that infinite and I don't know how to make my animation to repeat while on :hover.

    This is my code:

    $("body").delegate(".slider img", "mouseenter", function (e) {
    marginLeft: -300
    }, 400, function () {
    marginLeft: -302

    0 0

    Is there a bulletproof method to have the_content() render working shortcodes when being returned via ajax request?

    The issue I am having is some shotcodes are appearing as plain text and others are working as expected.

    This is how I am rendering the the post after a successfull ajax request to admin-ajax.php.

    <h1><?php the_title(); ?></h1>
        $postid = the_ID();
        $content = do_shortcode(get_post_field('post_content', $postid));
        $content = apply_filters('the_content', $content);
        echo $content;
        /* the_content() does not work at all when shortcodes are present */

    Could the issue be the way the other developers are initiating their shortcodes?

older | 1 | .... | 338 | 339 | (Page 340) | 341 | 342 | .... | 413 | newer