• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Eugen Oprea

Web Analytics, WordPress & SEO Advice

  • Work with Me
  • Blog
  • About
  • Contact

Genesis – How to Change Header Link/URL

November 28, 2012 by Eugen Oprea

If you have a larger site, you may have chosen WordPress as a blogging platform for it, perhaps installing it in a subdirectory. For this scenario it is desirable to change the header URL for your blog to point to the homepage of your main site.

Or if you have a membership site and your index has the sales page, you may want to have on the header a link to the members area and not the sales page (index).

This may be accomplished using the following code, which you can place inside functions.php of your Genesis child theme. Please change the wpbackpack URL below to match that of your main site:

Genesis – How to Change Text Shown When No Posts Are Found

November 22, 2012 by Eugen Oprea

WordPress uses the WP_Query class to handle requests for pages/posts to a WordPress blog. By default, Genesis displays the following text when no posts are found during such a request:

Sorry, no posts matched your criteria.

This might happen for example when displaying a category archive page and there are currently no posts in that category or when a search returns no results.

However, you can change this text by using the following code:

If you want to style the text that is displayed just add some styles in the style-sheet for .noposts-text.

Genesis – Custom Post Class

November 21, 2012 by Eugen Oprea

You can set a custom post class to style some posts differently on an archive page. For instance, you may want to style posts in the “Featured” category differently than posts in other categories.

Below is the code which adds a custom post class to posts in the “Featured” category:

Please see the Conditional Tags codex page for more details regarding the functions that can be used to test for various conditions.

Gravity Forms – Checkbox Dynamic Population

October 17, 2012 by Eugen Oprea

The gform_pre_render filter is executed before the form is displayed and can be used to manipulate the Form Object prior to rendering the form. It is generally used to dynamically populate form controls before the form is rendered.

Checkbox controls are special, in that they are treated as multi-input fields (similar to “Name” and “Address” fields). Besides the “choices” property which they share with “select”, “multi-select” and “radio” controls, they also have an “inputs” property. Please check the Field Object documentation page for more details.

Because of this, dynamic population for checkbox controls is somewhat different compared to the other multi-choice field controls.

The following approach can be used for checkboxes: on “gform_pre_render” use RGFormsModel::get_form_meta() method to fetch the form from database, then populate the form controls as required, and then the form is saved back to the database using RGFormsModel::update_form_meta(). This behaviour can be controlled using a boolean constant, as shown below:

Using this approach you can view the checkbox values in the entry list as well as change the entry, by updating the submitted checkbox values.

Default WordPress .htaccess for “Pretty” Permalinks

September 21, 2012 by Eugen Oprea

When you choose to use a “pretty” permalink structure, by default WordPress should create the .htaccess automatically and add the necessary code there.

However, if that doesn’t happen, it will display a message saying “You should update your .htaccess now” and you need to manually create the file.

To do this, just open your preferred text editor and add the code below.

Then save it as .htaccess (but make sure that it doesn’t have a .txt extension) and upload it in the root directory of your website.

If you already have a file there, you should check its contents before overwriting it.

  • « Go to Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Go to Next Page »

Footer

Get Exclusive Conversion Tips!

Learn how to get more email subscribers and increase sales with exclusive tips and insights.

Copyright © 2009 - 2026 · EChOelse International Group Ltd. · All Rights Reserved · Smart Theme on Genesis Framework

  • Privacy Policy
  • Refund Policy
  • Terms of Services
  • Code
  • Contact