Posh John

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 43 total)
  • Author
    Posts
  • in reply to: How to get CMB working within a plugin? #93443

    Posh John
    Participant
    Post count: 42

    Figured it out!

    For anyone that’s interested, the “require_once” line should have been >

    require_once( plugin_dir_path(__FILE__) . 'lib/metabox/init.php' );

    Cool – i just built my first plugin :-)


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Get parent page title? #70685

    Posh John
    Participant
    Post count: 42

    I figured it out so i thought i’d add it here just in case anyone else needs to know.

    I just needed to add global $post;


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Get parent page title? #70576

    Posh John
    Participant
    Post count: 42

    Hi,
    Yes i am using HTML5. The problem is not with the hook, it’s just the fact that it’s picking up the page title and not the parent page title.
    I checked the codex and my code should work….?


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: PHP Wizrds…help please! #60585

    Posh John
    Participant
    Post count: 42

    Hi Gary,

    Thanks for that Gary. Even though i got it to work, it’s fantastic to see how it is done “properly”, so i really appreciate the time you took to show me this.

    I will now study your code and go off and research the terms you used to try and learn why you did it the way you did…this is invaluable to me learning to code better.

    Thanks again for taking the time to provide this.

    Kind regards
    John.


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: PHP Wizrds…help please! #60497

    Posh John
    Participant
    Post count: 42

    Hi again Gary,

    Don’t worry i’ve figured it out (although there may probably be a better way!!). Anyway, i added a get_term_by to fetch the details i needed. I know that makes a lot of queries, but it’s the best i could figure out with my limited php ability.

    See what you think:

    <?php /*
    Template Name: All Artists
    */ ?> 
    
    <?php
    
    function namesplitter($a, $b) {
        $aLast = end(explode(' ', $a));
        $bLast = end(explode(' ', $b));
    
        return strcasecmp($aLast, $bLast);
    }
    
    add_action( 'genesis_entry_content', 'display_sorted_tax', 10, 2 );
    function display_sorted_tax() {
    
    $args = array(
    	'taxonomy' => 'artist',
    	'fields' => 'names'
    	);
    
    $terms = get_terms('artist', $args);
    uasort($terms, 'namesplitter');
    
    $count = count($terms); $i=0;
    if ($count > 0) {
        $term_list = '<p class="my_term-archive">';
        foreach ($terms as $termname) {
    		$term = get_term_by('name', $termname, 'artist');
            $i++;
        	$term_list .= '<a href="' . get_term_link( $term ) . '" title="' . sprintf(__('View all post filed under %s', 'my_localization_domain'), $term->name) . '">' . $term->name . '</a>';
        	if ($count != $i) $term_list .= ' &middot; '; else $term_list .= '</p>';
    	}
        echo $term_list;
    }
    
    }
    
    genesis();

    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: PHP Wizrds…help please! #60487

    Posh John
    Participant
    Post count: 42

    Hi Gary,

    Firstly, thanks for your help so far.

    I’ve been at this all day now and i have finally reached a eureka moment…and i’m as happy as a pig in sh*t, but, there’s one more piece to the puzzle.

    i now have my taxonomy listing in surname order but i can’t figure out how to make the names link to the correct pages. When i query WP i am only asking for the taxonomy name (otherwise my name-splitter function throws an error). do you have any ideas how i can query the taxonomy and have the results link to their pages?

    Here is what i have so far…

    <?php /*
    Template Name: All Artists
    */ ?> 
    
    <?php
    
    function namesplitter($a, $b) {
        $aLast = end(explode(' ', $a));
        $bLast = end(explode(' ', $b));
    
        return strcasecmp($aLast, $bLast);
    }
    
    add_action( 'genesis_entry_content', 'display_sorted_tax', 10, 2 );
    function display_sorted_tax() {
    
    $args = array(
    	'taxonomy' => 'artist',
    	'fields' => 'names'
    	);
    
    $terms = get_terms('artist', $args);
    uasort($terms, 'namesplitter');
    
    $count = count($terms); $i=0;
    if ($count > 0) {
        $term_list = '<p class="my_term-archive">';
        foreach ($terms as $term) {
            $i++;
        	$term_list .= $term;
        	if ($count != $i) $term_list .= ' &middot; '; else $term_list .= '</p>';
        }
        echo $term_list;
    }
    
    }
    
    genesis();

    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: PHP Wizrds…help please! #60399

    Posh John
    Participant
    Post count: 42

    Hi Gary,

    Thanks for stopping by. I am still getting the error though. Its says:
    Warning: Missing argument 2 for lastNameSort() in /home/editions/public_html/wp-content/themes/mytheme-genesis/single-artists.php on line 8
    Line 8 is:

    function lastNameSort($a, $b ) {

    Any more ideas are welcome :-)

    Thanks


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Website for web services #44284

    Posh John
    Participant
    Post count: 42

    Looks great but you should look at the portfolio images on the homepage – they look blurred (they are being stretched from 330px to about 353px)….otherwise i like it :-)


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Hover effect #35382

    Posh John
    Participant
    Post count: 42

    Part of my explanation got turned into hyperlinks (maybe a mod could fix please – i can’t edit it)

    If you are going to add the button inside an area with an id of “your-div” you would add the code i posted in your slylesheet.

    Then you just add class=”quote” to your link.


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Hover effect #35286

    Posh John
    Participant
    Post count: 42

    You would add a class to the element, which would look something like:

    Request A Quote

    Then your new quote class would need styling with css to get the background colour and padding etc. An example would look something like this:

    #your-div a.quote {
    background-color: #333;
    padding: 20px;
    }

    #your-div a.quote:hover {
    background-color: #ff0000;
    }

    The nice fading effect is the transition time which should already exist in your genesis sample theme.


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: How to change font of Copyright c 2013 footoer claim #35284

    Posh John
    Participant
    Post count: 42

    First you’ll need to get rid of the text shadow on line 1343 in style.css (delete the line that says “text-shadow:1px 1px #FFFFFF;”)

    To change the footer link colours find this on line 1360 of your style.css

    #footer a, #footer a:visited {
    color: #333333;
    }

    …and change the #333333 to #fff

    To change the non-hyperlinked paragraph text, change line 1356 in style.css to..

    #footer p {
    color: #FFFFFF;
    font-size: 14px;
    }

    Ps: The link you gave pointed to the https version of your url and you don’t have a security certificate, which is throwing up warning messages


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Getting indexed by Shuffler.FM #35281

    Posh John
    Participant
    Post count: 42

    Is your website getting indexed by the other search engines? If not you may have inadvertantly set it to be hidden so you could check that first.

    If you post a link to your website it may help diagnose what is happening. Also you could try adding the plugin they mention – http://wordpress.org/extend/plugins/pushpress/


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Help selecting a theme #35280

    Posh John
    Participant
    Post count: 42

    A slideshow could be added to any Genesis child theme. If you’re coding skills are not so good, it would be easier to pick a theme which already has a widgetized area where you want it on the homepage – but adding it to a theme which doesn’t have one is not too in-depth.


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: How do I alter my genesis theme? #35098

    Posh John
    Participant
    Post count: 42

    Brad’s answer just about covered everything you need to know, but i just thought i would add that you can still create your own template files too if you like.

    There is a really good series explaining Genesis on Nick The Geek’s website:

    http://designsbynickthegeek.com/category/tutorials

    There are also some great articles on wpsmith:

    http://wpsmith.net/category/genesis/

    … and of course not forgetting Bill’s site:

    http://www.billerickson.net/?s=genesis

    Happy reading :-)


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

    in reply to: Slider Not Showing Up #35095

    Posh John
    Participant
    Post count: 42

    Which slider are you using? Looking at your page source i can see the slides, but they are picking up the display:none; from the css. I would image this setting is for the slides that should not be visible (the ones that are coming next) which leads me to think it may be a settings problem – is there a setting in your slideshow plugin for the number of slides to show?


    Thus the heavens and the earth were completed in all their vast array. Genesis 2

Viewing 15 posts - 1 through 15 (of 43 total)