Tag Info

Hot answers tagged

3

Did you even open header.php and take a peek? You'll see genesis_before() called right after the opening <body> tag - follow the white rabbit and you get: function genesis_before() { do_action('genesis_before'); } And likewise for the footer. So... add_action( 'genesis_before', 'my_genesis_script' ); add_action( 'genesis_after', 'my_genesis_script' ...


2

First - Do not alter the core. Second - These links may help you with what you need to achieve. Display posts from specific category, tag on page in Genesis By default, WordPress generate pages for all tags and categories automatically. If you click specific category page (like site.com/category/guide), it will display all posts ‘date-wise’ from ...


2

Also using query_posts() is highly discouraged. If you need a second loop, use new WP_Query() or if you want to adjust the main loop then use pre_get_posts. If you home page is not a static page, then this should work regardless of what theme you use. (Goes in functions.php... preferably a child theme if you are working with a framework) function ...


2

(Cut/pasted from the OP.) SOLUTION: As it turns out, this is very simple. Go to your Dashboard --> Genesis --> Theme Settings Now in the box labelled "Content Archives" select "Display Post Excerpts" from the drop down menu. Now make sure the "Include the Featured Image" box is checked and select your image size. Save Settings. The featured-image ...


2

All you need is a simple query and to iterate over that query a couple of times so you can build the two required lists. WP_Query has a convenient method for resetting the pointer in the posts array, so you can loop over it again, called rewind_posts though i believe inside custom loops you have to reference the method directly.. Anyway, here's the kind of ...


2

get_the_terms() you are using is returning array of items, which cannot be simply echoed to page. You should try using higher level get_the_term_list() function, which returns string of concatenated results and can be echoed.


2

You could try to use the wp_nav_menu_args filter (untested): /** * Add the Menu_With_Data_Attr walker to the wp_nav_menu() used by genesis_do_nav() */ add_filter( 'wp_nav_menu_args', function( $args ){ if( isset( $args['menu_class'] ) && 'menu genesis-nav-menu menu-primary' === $args['menu_class'] ) { if( ...


1

How about instead of genesis_custom_field('instrument'); use: echo genesis_get_custom_field('instrument'); Plus the genesis_after_post_title action hook is deprecated since 1.7.0 and you should use genesis_entry_header with correct priorities. For more information please use the reference links below. Reference: genesis_after_post_title Genesis 2.0 ...


1

On a category page, you can use the function single_cat_title(), or the more generic single_term_title(). These functions pull from the global $wp_query object, via get_queried_object().


1

I'm not familiar with Genesis, but most WordPress pagination issues have similar cause. When you load a page in WordPress, the results of the main default query determines the number of available pages. You're seeing the results of your custom query, but the pagination is based on an entirely different query. This is typically solved by using the ...


1

Use the 'genesis_search_title_text' filter: add_filter( 'genesis_search_title_text', 'wpse_101947_search_title_text' ); function wpse_101947_search_title_text() { return 'Translated text'; } Replace Translated text with your translated text.


1

I've found explode() to be useful when trying to break strings apart. This code creates an array of paragraph chunks, inserts the new block after two paragraphs and concatenates it back into a string for output. function insert_ad_block( $text ) { if ( is_single() ) : $ads_text = '<div class="wpselect_middle_content">My Ad Code ...


1

I would use the Genesis Simple Hooks plugin which allows you to add code to Genesis Comment Form hook. I'm using Hostgator ads for this example, but adsense can be used too. I dropped this code <a href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=brilliantpamela-" style="float:right; margin: 4px 3px;"><img ...


1

These are the actions Genesis takes in the comment section: do_action( 'genesis_before_comments' ); do_action( 'genesis_comments' ); do_action( 'genesis_after_comments' ); do_action( 'genesis_before_pings' ); do_action( 'genesis_pings' ); do_action( 'genesis_after_pings' ); do_action( 'genesis_before_comment_form' ); do_action( 'genesis_comment_form' ); ...


1

Today I had a similar issue and this worked for me: /** * Add and extra class to the entry-content div * */ function vdl_entry_content_extraclass( $attributes ) { $attributes['class'] = $attributes['class']. ' my-custom-class'; return $attributes; } add_filter( 'genesis_attr_entry-content', 'vdl_entry_content_extraclass' ); In my case, I am ...


1

This should do it. I can't test it right now. I used the genesis_header_markup_open() and the genesis_header_markup_open() Genesis functions and renamed them wpse_121660_header_markup_open() and wpse_121660_header_markup_close(). Then called them instead of the Genesis functions and added your new <div> in them. /** Reposition header outside main ...


1

I think both issues can be solved by altering what's happening inside the loop. The code you've posted are the arguments that are used for the query. There is a while loop which then goes through the results of the query and displays them. Try to find while ($wp_query->have_posts()): $wp_query->the_post();. Between this and endwhile; the results are ...


1

Try this: add_action( 'template_redirect', 'wpse_124609_remove_titles' ); /** * Move or remove some post titles. */ function wpse_124609_remove_titles() { if ( is_front_page() ) { remove_action( 'genesis_post_title', 'genesis_do_post_title' ); } else if ( is_page() || is_single() ) { remove_action( 'genesis_post_title', ...


1

You could create all your own templates in a child theme but the core engine does contain the HTML tags and ids. For me this is the problem with Theme Frameworks (Unless your willing to totally commit to them). The code quality is outstanding but it's just too much work to roll things your own way. Just to remove the the genesis and studio press links in ...


1

i can't test this as a child theme of Genesis, but i just tested it on a child theme of Thematic and it worked fine. there isn't anything in the code that should prevent it from running. that said, i don't like registering post types as part of a theme... what if you change the theme down the line.... do you just want to lose (not lose since it will still ...


1

As it turns out, all I needed to do was add the following to the function.php of my genesis child-theme. add_action('init' , 'wpec_genesis_add_layout_support'); function wpec_genesis_add_layout_support(){ add_post_type_support( 'wpsc-product', 'genesis-layouts' ); }


1

I think your best bet would be to use a service like Fetch or Quickly. Although these aren't integrated into WordPress proper, they're the best way I've found for selling digital assets on the web.


1

what you need is an eCommerce plugin for wordpress like WP e-Commerce with some extension that gives buy and download features or Cart66 or Cart66 lite. If you want a detailed list on wordpress eCommerce plugins and themes check out this answer of mine. Do check this , it will help you so you do not choose a costly one as there are many free ones out there ...


1

Using the Download Monitor plugin allows me to categorize files, so I put my files in there instead of the Media Library. I organize files into categories based on which pages I want to display them. Then, I use a text widget with a custom shortcode to display files per category per page. In my theme's functions.php: // Enable shortcodes in text widgets ...


1

You can use this... <?php get_header(); ?> <?php genesis_before_content_sidebar_wrap(); ?> <div id="content-sidebar-wrap"> <?php genesis_before_content(); ?> <div id="content" class="hfeed"> <?php genesis_before_loop(); ?> <?php genesis_loop(); ?> <?php genesis_after_loop(); ...


1

The advantage of using a framework is two-fold: If using a theme framework to build a regular theme, it can give you a head start by giving you mature code (in most major frameworks, anyway) that you can use as a base for your customizations. This gives you more control of the theme framework code but also creates a bit of a problem: you now have a forked ...


1

Edit: Sorry, completely misinterpreted your question. With genesis_widget_area('sidebar'); you can have the primary sidebar appear on your homepage. As found in genesis/lib/functions/widgetize.php [wrong answer]Did you choose a layout with a sidebar? You can do this either in the general Genesis Theme settings or in the page/post/category editor? If so, did ...


1

1) use posts_per_page to set number of posts 2) your add_action and its associated function needs to be in your theme's functions.php file, not the template. the pre_get_posts action is the preferred method between the two, use that one.


1

Are you looking to set the entire site full-width or a page? You should have an option like this under Genesis > Theme Options: http://cl.ly/3i2n3j2e2s1p0q1N2q3Z For a page, you can find the same options under the visual editor.



Only top voted, non community-wiki answers of a minimum length are eligible